notifications: Add 'none' to unread count options.

This commit is contained in:
Kanishk Kakar
2019-08-20 03:03:11 +05:30
committed by Tim Abbott
parent 330d065a69
commit e4f0d3d79b
4 changed files with 15 additions and 0 deletions

View File

@@ -552,9 +552,14 @@ exports.calculate_notifiable_count = function (res) {
var only_show_notifiable = page_params.desktop_icon_count_display ===
settings_notifications.desktop_icon_count_display_values.notifiable.code;
var no_notifications = page_params.desktop_icon_count_display ===
settings_notifications.desktop_icon_count_display_values.none.code;
if (only_show_notifiable) {
// DESKTOP_ICON_COUNT_DISPLAY_NOTIFIABLE
new_message_count = res.mentioned_message_count + res.private_message_count;
} else if (no_notifications) {
// DESKTOP_ICON_COUNT_DISPLAY_NONE
new_message_count = 0;
} else {
// DESKTOP_ICON_COUNT_DISPLAY_MESSAGES
new_message_count = res.home_unread_messages;