diff --git a/public/src/client/header/unread.js b/public/src/client/header/unread.js index 40e8e143cf..79eb0513cb 100644 --- a/public/src/client/header/unread.js +++ b/public/src/client/header/unread.js @@ -1,6 +1,6 @@ 'use strict'; -define('forum/header/unread', function () { +define('forum/header/unread', ['hooks'], function (hooks) { const unread = {}; const watchStates = { ignoring: 1, @@ -89,6 +89,8 @@ define('forum/header/unread', function () { .attr('data-content', count > 99 ? '99+' : count); $('#mobile-menu [data-unread-url="' + url + '"]').attr('data-content', count > 99 ? '99+' : count); + + hooks.fire('action:unread.updateCount', { url, count }); } unread.updateUnreadTopicCount = updateUnreadTopicCount;