mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
breaking: remove action:category.loaded, use action:topics.loading
action:category.loaded will not fire on infintite load of topics
This commit is contained in:
@@ -136,7 +136,7 @@ define('forum/category', [
|
||||
function loadTopicsAfter(after, direction, callback) {
|
||||
callback = callback || function () {};
|
||||
|
||||
hooks.fire('action:category.loading');
|
||||
hooks.fire('action:topics.loading');
|
||||
const params = utils.params();
|
||||
infinitescroll.loadMore('categories.loadMore', {
|
||||
cid: ajaxify.data.cid,
|
||||
@@ -145,7 +145,7 @@ define('forum/category', [
|
||||
query: params,
|
||||
categoryTopicSort: config.categoryTopicSort,
|
||||
}, function (data, done) {
|
||||
hooks.fire('action:category.loaded');
|
||||
hooks.fire('action:topics.loaded', { topics: data.topics });
|
||||
callback(data, done);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,10 +6,7 @@ define('hooks', [], () => {
|
||||
temporary: new Set(),
|
||||
runOnce: new Set(),
|
||||
deprecated: {
|
||||
'action:script.load': 'filter:script.load', // 👋 @ 1.18.0
|
||||
'action:category.loaded': 'action:topics.loaded', // 👋 @ 1.19.0
|
||||
'action:category.loading': 'action:topics.loading', // 👋 @ 1.19.0
|
||||
'action:composer.check': 'filter:composer.check', // 👋 @ 1.19.0
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user