1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Remove unnecessary redraw

This commit is contained in:
Alexander Skvortsov
2020-07-06 19:23:19 -04:00
committed by Franz Liedke
parent b2917c8716
commit ba82969a58

View File

@@ -61,8 +61,6 @@ class PostStreamState {
const promise = this.loadNearNumber(number); const promise = this.loadNearNumber(number);
m.redraw(true);
this.locationType = 'number'; this.locationType = 'number';
this.number = number; this.number = number;
this.needsScroll = true; this.needsScroll = true;
@@ -88,8 +86,7 @@ class PostStreamState {
const promise = this.loadNearIndex(index); const promise = this.loadNearIndex(index);
m.redraw(true); console.log('promiseGenerated');
this.locationType = 'index'; this.locationType = 'index';
this.index = index; this.index = index;
this.needsScroll = true; this.needsScroll = true;
@@ -115,6 +112,7 @@ class PostStreamState {
* @return {Promise} * @return {Promise}
*/ */
goToLast() { goToLast() {
m.redraw(true);
return this.goToIndex(this.count() - 1); return this.goToIndex(this.count() - 1);
} }