mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: ensures category order keeps consistent (#10165)
Before this change: - first full page load would get category defaults defined un cateory settings - a navigation to a topic and then back to categories list would reset defaut to the ones defined in discovery/topics
This commit is contained in:
@@ -21,7 +21,7 @@ const controllerOpts = {
|
||||
showTopicPostBadges: not("discoveryTopics.new"),
|
||||
redirectedReason: alias("currentUser.redirected_to_top.reason"),
|
||||
|
||||
order: "default",
|
||||
order: null,
|
||||
ascending: false,
|
||||
expandGloballyPinned: false,
|
||||
expandAllPinned: false,
|
||||
@@ -37,11 +37,11 @@ const controllerOpts = {
|
||||
changeSort(sortBy) {
|
||||
if (sortBy === this.order) {
|
||||
this.toggleProperty("ascending");
|
||||
this.model.refreshSort(sortBy, this.ascending);
|
||||
} else {
|
||||
this.setProperties({ order: sortBy, ascending: false });
|
||||
this.model.refreshSort(sortBy, false);
|
||||
}
|
||||
|
||||
this.model.refreshSort(sortBy, this.ascending);
|
||||
},
|
||||
|
||||
// Show newly inserted topics
|
||||
|
||||
Reference in New Issue
Block a user