mirror of
https://github.com/flarum/core.git
synced 2025-08-02 14:37:49 +02:00
Remove app.search instance, cache app.cache.searched (#2151)
* Moved search state logic into search state
This commit is contained in:
committed by
GitHub
parent
f4afb006ed
commit
4a804dbbbc
@@ -1,6 +1,5 @@
|
||||
import History from './utils/History';
|
||||
import Pane from './utils/Pane';
|
||||
import Search from './components/Search';
|
||||
import ReplyComposer from './components/ReplyComposer';
|
||||
import DiscussionPage from './components/DiscussionPage';
|
||||
import SignUpModal from './components/SignUpModal';
|
||||
@@ -15,6 +14,7 @@ import alertEmailConfirmation from './utils/alertEmailConfirmation';
|
||||
import Application from '../common/Application';
|
||||
import Navigation from '../common/components/Navigation';
|
||||
import NotificationListState from './states/NotificationListState';
|
||||
import GlobalSearchState from './states/GlobalSearchState';
|
||||
|
||||
export default class ForumApplication extends Application {
|
||||
/**
|
||||
@@ -35,13 +35,6 @@ export default class ForumApplication extends Application {
|
||||
discussionRenamed: DiscussionRenamedPost,
|
||||
};
|
||||
|
||||
/**
|
||||
* The page's search component instance.
|
||||
*
|
||||
* @type {Search}
|
||||
*/
|
||||
search = new Search();
|
||||
|
||||
/**
|
||||
* An object which controls the state of the page's side pane.
|
||||
*
|
||||
@@ -71,6 +64,14 @@ export default class ForumApplication extends Application {
|
||||
*/
|
||||
notifications = new NotificationListState(this);
|
||||
|
||||
/*
|
||||
* An object which stores previously searched queries and provides convenient
|
||||
* tools for retrieving and managing search values.
|
||||
*
|
||||
* @type {GlobalSearchState}
|
||||
*/
|
||||
search = new GlobalSearchState();
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
Reference in New Issue
Block a user