1
0
mirror of https://github.com/flarum/core.git synced 2025-10-26 13:16:11 +01: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

@@ -60,7 +60,7 @@ export default class GlobalSearchState extends SearchState {
changeSort(sort) {
const params = this.params();
if (sort === Object.keys(app.cache.discussionList.sortMap())[0]) {
if (sort === Object.keys(app.discussions.sortMap())[0]) {
delete params.sort;
} else {
params.sort = sort;