mirror of https://github.com/zulip/zulip.git
navbar: Remove userlist unread count.
This commit is contained in:
parent
6f6a53c909
commit
ce804fc37a
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue