fix: use query param sort over user setting if it's set

regression from 77ddfc642e
This commit is contained in:
Barış Soner Uşaklı
2023-04-27 21:39:24 -04:00
parent 56ad381ff2
commit 9484ddc36f
2 changed files with 2 additions and 2 deletions

View File

@@ -139,7 +139,7 @@ define('forum/category', [
after: after, after: after,
direction: direction, direction: direction,
query: params, query: params,
categoryTopicSort: config.categoryTopicSort, categoryTopicSort: params.sort || config.categoryTopicSort,
}, function (data, done) { }, function (data, done) {
hooks.fire('action:topics.loaded', { topics: data.topics }); hooks.fire('action:topics.loaded', { topics: data.topics });
callback(data, done); callback(data, done);

View File

@@ -270,7 +270,7 @@ define('forum/topic/posts', [
after: after + (direction > 0 ? 1 : 0), after: after + (direction > 0 ? 1 : 0),
count: config.postsPerPage, count: config.postsPerPage,
direction: direction, direction: direction,
topicPostSort: config.topicPostSort, topicPostSort: utils.params().sort || config.topicPostSort,
}, function (data, done) { }, function (data, done) {
indicatorEl.fadeOut(); indicatorEl.fadeOut();