From 98c684c97908337993ee64a6d7a1c0e8c4d9af4f Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Fri, 25 Sep 2020 16:02:39 -0400 Subject: [PATCH] Fixed noAnimation: previously, the opposite of what was requested happened --- framework/core/js/src/forum/components/PostStream.js | 4 ++-- framework/core/js/src/forum/states/PostStreamState.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/core/js/src/forum/components/PostStream.js b/framework/core/js/src/forum/components/PostStream.js index 404913511..df3bfb10c 100644 --- a/framework/core/js/src/forum/components/PostStream.js +++ b/framework/core/js/src/forum/components/PostStream.js @@ -132,10 +132,10 @@ export default class PostStream extends Component { } if ('number' in newTarget) { - this.scrollToNumber(newTarget.number, this.stream.noAnimationScroll); + this.scrollToNumber(newTarget.number, this.stream.animateScroll); } else if ('index' in newTarget) { const backwards = newTarget.index === this.stream.count() - 1; - this.scrollToIndex(newTarget.index, this.stream.noAnimationScroll, backwards); + this.scrollToIndex(newTarget.index, this.stream.animateScroll, backwards); } this.prevTarget = newTarget; diff --git a/framework/core/js/src/forum/states/PostStreamState.js b/framework/core/js/src/forum/states/PostStreamState.js index 355db56be..277fd4959 100644 --- a/framework/core/js/src/forum/states/PostStreamState.js +++ b/framework/core/js/src/forum/states/PostStreamState.js @@ -104,7 +104,7 @@ class PostStreamState { this.loadPromise = this.loadNearNumber(number); this.targetPost = { number }; - this.noAnimationScroll = noAnimation; + this.animateScroll = !noAnimation; this.number = number; // In this case, the redraw is only called after the response has been loaded @@ -128,7 +128,7 @@ class PostStreamState { this.loadPromise = this.loadNearIndex(index); this.targetPost = { index }; - this.noAnimationScroll = noAnimation; + this.animateScroll = !noAnimation; this.index = index; m.redraw();