Skip to content

Commit

Permalink
fix: use hooks module instead of window trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny authored and julianlam committed Jul 14, 2021
1 parent c4be007 commit acb11cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/src/modules/topicList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';

Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit acb11cc

Please sign in to comment.