feat: add action:unread.updateCount

This commit is contained in:
Barış Soner Uşaklı
2022-09-29 10:42:32 -04:00
parent a970c615fb
commit daaa93b6e4

View File

@@ -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;