Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

left_sidebar: Move unread count from all messages to inbox.

Aman Agrawal4f881ee058e2
diff --git a/web/src/left_sidebar_navigation_area.js b/web/src/left_sidebar_navigation_area.js
index c39352d952a..c05c98ffc40 100644
--- a/web/src/left_sidebar_navigation_area.js
+++ b/web/src/left_sidebar_navigation_area.js
@@ -25,12 +25,12 @@ export function update_scheduled_messages_row() {
export function update_dom_with_unread_counts(counts, skip_animations) {
// Note that direct message counts are handled in pm_list.js.
- // mentioned/home have simple integer counts
+ // mentioned/inbox have simple integer counts
const $mentioned_li = $(".top_left_mentions");
- const $home_li = $(".top_left_all_messages");
+ const $inbox_li = $(".top_left_inbox");
ui_util.update_unread_count_in_dom($mentioned_li, counts.mentioned_message_count);
- ui_util.update_unread_count_in_dom($home_li, counts.home_unread_messages);
+ ui_util.update_unread_count_in_dom($inbox_li, counts.home_unread_messages);
if (!skip_animations) {
animate_mention_changes($mentioned_li, counts.mentioned_message_count);
diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbs
index 48f5c6b7847..04a7c00f6e8 100644
--- a/web/templates/left_sidebar.hbs
+++ b/web/templates/left_sidebar.hbs
@@ -7,7 +7,8 @@
<i class="zulip-icon zulip-icon-inbox" aria-hidden="true"></i>
</span>
{{~!-- squash whitespace --~}}
- <span>{{t 'Inbox' }}</span>
+ <span class="global-filter-name">{{t 'Inbox' }}</span>
+ <span class="unread_count"></span>
</a>
</li>
<li class="top_left_recent_view top_left_row">
@@ -26,7 +27,6 @@
</span>
{{~!-- squash whitespace --~}}
<span class="global-filter-name">{{t 'All messages' }}</span>
- <span class="unread_count"></span>
</a>
<span class="arrow sidebar-menu-icon all-messages-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span>
</li>