mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
This commit is contained in:
@@ -122,6 +122,8 @@ define('forum/unread', [
|
|||||||
$('a[href="' + config.relative_path + url + '"].navigation-link i')
|
$('a[href="' + config.relative_path + url + '"].navigation-link i')
|
||||||
.toggleClass('unread-count', count > 0)
|
.toggleClass('unread-count', count > 0)
|
||||||
.attr('data-content', count > 99 ? '99+' : count);
|
.attr('data-content', count > 99 ? '99+' : count);
|
||||||
|
|
||||||
|
$('#mobile-menu [data-unread-url="' + url + '"]').attr('data-content', count > 99 ? '99+' : count);
|
||||||
}
|
}
|
||||||
|
|
||||||
Unread.initUnreadTopics = function () {
|
Unread.initUnreadTopics = function () {
|
||||||
|
|||||||
@@ -183,6 +183,8 @@ async function appendUnreadCounts({ uid, navigation, unreadData, query }) {
|
|||||||
newTopic: unreadCounts.new || 0,
|
newTopic: unreadCounts.new || 0,
|
||||||
watchedTopic: unreadCounts.watched || 0,
|
watchedTopic: unreadCounts.watched || 0,
|
||||||
unrepliedTopic: unreadCounts.unreplied || 0,
|
unrepliedTopic: unreadCounts.unreplied || 0,
|
||||||
|
mobileUnread: 0,
|
||||||
|
unreadUrl: '/unread',
|
||||||
chat: results.unreadChatCount || 0,
|
chat: results.unreadChatCount || 0,
|
||||||
notification: results.unreadNotificationCount || 0,
|
notification: results.unreadNotificationCount || 0,
|
||||||
flags: results.unreadFlagCount || 0,
|
flags: results.unreadFlagCount || 0,
|
||||||
@@ -200,6 +202,8 @@ async function appendUnreadCounts({ uid, navigation, unreadData, query }) {
|
|||||||
if (item && item.originalRoute === route) {
|
if (item && item.originalRoute === route) {
|
||||||
unreadData[filter] = _.zipObject(tidsByFilter[filter], tidsByFilter[filter].map(() => true));
|
unreadData[filter] = _.zipObject(tidsByFilter[filter], tidsByFilter[filter].map(() => true));
|
||||||
item.content = content;
|
item.content = content;
|
||||||
|
unreadCount.mobileUnread = content;
|
||||||
|
unreadCount.unreadUrl = route;
|
||||||
if (unreadCounts[filter] > 0) {
|
if (unreadCounts[filter] > 0) {
|
||||||
item.iconClass += ' unread-count';
|
item.iconClass += ' unread-count';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user