1
0
mirror of https://github.com/flarum/core.git synced 2025-07-12 20:36:28 +02:00

Refactor start/endComputation into lazyRedraw method

This commit is contained in:
Toby Zerner
2015-08-31 12:04:51 +09:30
parent 9f28b4e8dc
commit 0474f410a4
5 changed files with 14 additions and 16 deletions

View File

@ -149,12 +149,7 @@ export default class DiscussionPage extends mixin(Component, evented) {
.then(this.init.bind(this));
}
// Since this may be called during the component's constructor, i.e. in the
// middle of a redraw, forcing another redraw would not bode well. Instead
// we start/end a computation so Mithril will only redraw if it isn't
// already doing so.
m.startComputation();
m.endComputation();
m.lazyRedraw();
}
/**