1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +02:00

Move Discussion List State into its own class (#2150)

Extract discussion list state
This commit is contained in:
Alexander Skvortsov
2020-06-18 19:53:40 -04:00
committed by GitHub
parent c5d3b058ba
commit 5c1663d8f1
9 changed files with 230 additions and 204 deletions

View File

@@ -15,6 +15,7 @@ import Application from '../common/Application';
import Navigation from '../common/components/Navigation';
import NotificationListState from './states/NotificationListState';
import GlobalSearchState from './states/GlobalSearchState';
import DiscussionListState from './state/DiscussionListState';
export default class ForumApplication extends Application {
/**
@@ -76,6 +77,19 @@ export default class ForumApplication extends Application {
super();
routes(this);
/**
* An object which controls the state of the cached discussion list, which
* is used in the index page and the slideout pane.
*
* @type {DiscussionListState}
*/
this.discussions = new DiscussionListState({ forumApp: this });
/**
* @deprecated beta 14, remove in beta 15.
*/
this.cache.discussionList = this.discussions;
}
/**