pm_list: Show correct unread unread counts.

We only update the `.private_messages_header` here since
unread_counts of `.expanded_private_message` are updated
via `pm_list.update_private_messages`.

This fixes the bug of PMs in `.expanded_private_message` having
the same unread count as `private_messages_header`.

Since we rerender the DOM of `.expanded_private_message` every
time we update unread count of PMs, we don't need to manually
update them here. Also, we always keep them on display since
there is no real need to toggle them. They are not visible
when they have 0 unread counts via `.zero_count`.
This commit is contained in:
Aman Agrawal
2021-04-15 07:10:10 +00:00
committed by Tim Abbott
parent e5acbf9498
commit e41fffc43e
3 changed files with 3 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ export function clear_for_testing() {
// left corner of the app. This was split out from stream_list.js.
function get_filter_li() {
return $(".top_left_private_messages");
return $(".top_left_private_messages .private_messages_header");
}
function set_count(count) {