From acb11cc76465ab08ade663fcade750c82c90b859 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 14 Jul 2021 14:54:17 -0400 Subject: [PATCH] fix: use hooks module instead of window trigger --- public/src/modules/topicList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/modules/topicList.js b/public/src/modules/topicList.js index 3a636f773a..c4ee45e66a 100644 --- a/public/src/modules/topicList.js +++ b/public/src/modules/topicList.js @@ -6,7 +6,8 @@ define('topicList', [ 'topicSelect', 'categoryFilter', 'forum/category/tools', -], function (infinitescroll, handleBack, topicSelect, categoryFilter, categoryTools) { + 'hooks', +], function (infinitescroll, handleBack, topicSelect, categoryFilter, categoryTools, hooks) { var TopicList = {}; var templateName = ''; @@ -250,7 +251,7 @@ define('topicList', [ }; tplData.template[templateName] = true; - $(window).trigger('action:topics.loading', { topics: topics, after: after, before: before }); + hooks.fire('action:topics.loading', { topics: topics, after: after, before: before }); app.parseAndTranslate(templateName, 'topics', tplData, function (html) { topicListEl.removeClass('hidden');