Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
navbar: Remove userlist unread count.
Aman Agrawalce804fc37a92
diff --git a/web/src/unread.js b/web/src/unread.jsindex de3f0415e60..ce3b09f417c 100644--- a/web/src/unread.js+++ b/web/src/unread.js@@ -154,7 +154,6 @@ class UnreadDirectMessageCounter {get_counts(include_latest_msg_id = false) {const pm_dict = new Map(); // Hash by user_ids_string -> count Optional[, max_id]let total_count = 0;- let right_sidebar_count = 0;for (const [user_ids_string, id_set] of this.bucketer) {const count = id_set.size;if (include_latest_msg_id) {@@ -166,18 +165,11 @@ class UnreadDirectMessageCounter {} else {pm_dict.set(user_ids_string, count);}- const user_ids = people.user_ids_string_to_ids_array(user_ids_string);- const is_with_one_human =- user_ids.length === 1 && !people.get_by_user_id(user_ids[0]).is_bot;- if (is_with_one_human) {- right_sidebar_count += count;- }total_count += count;}return {total_count,pm_dict,- right_sidebar_count,};}@@ -822,7 +814,6 @@ export function get_counts() {const pm_res = unread_direct_message_counter.get_counts();res.pm_count = pm_res.pm_dict;res.direct_message_count = pm_res.total_count;- res.right_sidebar_direct_message_count = pm_res.right_sidebar_count;res.home_unread_messages += pm_res.total_count;return res;diff --git a/web/src/unread_ui.js b/web/src/unread_ui.jsindex fa96e351d74..d59931749ba 100644--- a/web/src/unread_ui.js+++ b/web/src/unread_ui.js@@ -89,13 +89,6 @@ export function update_unread_counts(skip_animations = false) {// Set the unread counts that we show in the buttons that// toggle open the sidebar menus when we have a thin window.set_count_toggle_button($("#streamlist-toggle-unreadcount"), res.home_unread_messages);- // Bots and group direct messages do not appear in the right- // sidebar user list, so we show unread counts for only non-bot,- // 1:1 direct messages there.- set_count_toggle_button(- $("#userlist-toggle-unreadcount"),- res.right_sidebar_direct_message_count,- );}export function should_display_bankruptcy_banner() {diff --git a/web/styles/search.css b/web/styles/search.cssindex 5d5b14e9115..ce6870c2f3d 100644--- a/web/styles/search.css+++ b/web/styles/search.css@@ -217,8 +217,7 @@width: 100%;border-radius: 0;box-shadow: none;- /* To be visible over `#streamlist-toggle-unreadcount`- and `#userlist-toggle-unreadcount`. */+ /* To be visible over `#streamlist-toggle-unreadcount` */z-index: 20;}diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex 8406dabc7b1..18b2332e78e 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -2297,8 +2297,7 @@ div.focused-message-list {padding-bottom: 9px;}-#streamlist-toggle-unreadcount,-#userlist-toggle-unreadcount {+#streamlist-toggle-unreadcount {position: absolute;display: none;height: 12px;diff --git a/web/templates/navbar.hbs b/web/templates/navbar.hbsindex 78c17a86839..a0cd02fe149 100644--- a/web/templates/navbar.hbs+++ b/web/templates/navbar.hbs@@ -48,7 +48,6 @@<div id="userlist-toggle" class="hidden-for-spectators tippy-zulip-delayed-tooltip" data-tooltip-template-id="userlist-tooltip-template"><a id="userlist-toggle-button" role="button" class="header-button" tabindex="0"><i class="zulip-icon zulip-icon-triple-users"></i>- <span id="userlist-toggle-unreadcount">0</span></a></div><div id="help-menu">