feat: add action:chat.updateCount client side hook

This commit is contained in:
Barış Soner Uşaklı
2022-09-29 09:21:13 -04:00
parent 58cecafb34
commit a970c615fb

View File

@@ -1,6 +1,6 @@
'use strict';
define('forum/header/chat', ['components'], function (components) {
define('forum/header/chat', ['components', 'hooks'], function (components, hooks) {
const chat = {};
chat.prepareDOM = function () {
@@ -31,6 +31,7 @@ define('forum/header/chat', ['components'], function (components) {
components.get('chat/icon')
.toggleClass('unread-count', count > 0)
.attr('data-content', count > 99 ? '99+' : count);
hooks.fire('action:chat.updateCount', { count });
});
};