mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
fix: convert some hooks to use hooks module
re: julianlam/nodebb-plugin-markdown#130
This commit is contained in:
@@ -9,7 +9,8 @@ define('forum/topic/posts', [
|
||||
'navigator',
|
||||
'components',
|
||||
'translator',
|
||||
], function (pagination, infinitescroll, postTools, images, navigator, components, translator) {
|
||||
'hooks',
|
||||
], function (pagination, infinitescroll, postTools, images, navigator, components, translator, hooks) {
|
||||
var Posts = { };
|
||||
|
||||
Posts.onNewPost = function (data) {
|
||||
@@ -226,7 +227,7 @@ define('forum/topic/posts', [
|
||||
|
||||
infinitescroll.removeExtra($('[component="post"]'), direction, Math.max(20, config.postsPerPage * 2));
|
||||
|
||||
$(window).trigger('action:posts.loaded', { posts: data.posts });
|
||||
hooks.fire('action:posts.loaded', { posts: data.posts });
|
||||
|
||||
Posts.onNewPostsAddedToDom(html);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user