mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Fixed noAnimation: previously, the opposite of what was requested happened
This commit is contained in:
parent
6508e64f55
commit
4c3e1e2625
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user