1
0
mirror of https://github.com/flarum/core.git synced 2025-10-11 15:04:25 +02:00

Prevent expensive redrawing in the discussion list

This commit is contained in:
Toby Zerner
2015-05-07 09:19:57 +09:30
parent c9f3ac9d66
commit a1ce2fa2ef
2 changed files with 24 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ export default class IndexPage extends Component {
var params = this.params();
if (app.cache.discussionList) {
app.cache.discussionList.willRedraw();
Object.keys(params).some(key => {
if (app.cache.discussionList.props.params[key] !== params[key]) {
app.cache.discussionList = null;
@@ -37,6 +38,10 @@ export default class IndexPage extends Component {
app.composer.minimize();
}
onunload() {
app.cache.discussionList.willRedraw();
}
/**
Params that stick between filter changes
*/