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: Fix DM row highlight linger on narrowing away.

Pratik Chanda0708505acb88
diff --git a/web/src/pm_list.ts b/web/src/pm_list.ts
index e451b915412..f616b387489 100644
--- a/web/src/pm_list.ts
+++ b/web/src/pm_list.ts
@@ -146,6 +146,7 @@ export function handle_narrow_activated(filter: Filter): void {
const active_filter = filter;
const is_all_private_message_view = _.isEqual(active_filter.sorted_term_types(), ["is-dm"]);
const narrow_to_private_messages_section = active_filter.operands("dm").length !== 0;
+ const is_private_messages_in_view = active_filter.has_operator("dm");
if (is_all_private_message_view) {
// In theory, this should get expanded when we scroll to the
@@ -166,6 +167,8 @@ export function handle_narrow_activated(filter: Filter): void {
scroll_pm_into_view($active_filter_li);
}
update_private_messages();
+ } else if (!is_private_messages_in_view) {
+ update_private_messages();
}
}