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:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user