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:
committed by
GitHub
parent
c5d3b058ba
commit
5c1663d8f1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user