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.

narrow: Call reset_ui_state at start of narrowing process.

YashRE42089fdc4d9453
diff --git a/frontend_tests/node_tests/narrow_activate.js b/frontend_tests/node_tests/narrow_activate.js
index 424f07f7bfe..b12fc189bcd 100644
--- a/frontend_tests/node_tests/narrow_activate.js
+++ b/frontend_tests/node_tests/narrow_activate.js
@@ -192,10 +192,10 @@ run_test("basics", () => {
assert.equal(narrow_state.narrowed_to_pms(), false);
helper.assert_events([
- [notifications, "clear_compose_notifications"],
- [notifications, "redraw_title"],
[message_scroll, "hide_top_of_narrow_notices"],
[message_scroll, "hide_indicators"],
+ [notifications, "clear_compose_notifications"],
+ [notifications, "redraw_title"],
[ui_util, "change_tab_to"],
[unread_ops, "process_visible"],
[hashchange, "save_narrow"],
diff --git a/static/js/narrow.js b/static/js/narrow.js
index 66fb5e16252..1035bb1554f 100644
--- a/static/js/narrow.js
+++ b/static/js/narrow.js
@@ -197,6 +197,7 @@ export function activate(raw_operators, opts) {
const start_time = new Date();
+ reset_ui_state();
if (recent_topics_util.is_visible()) {
recent_topics_ui.hide();
}
@@ -218,7 +219,6 @@ export function activate(raw_operators, opts) {
const operators = filter.operators();
update_narrow_title(filter);
- reset_ui_state();
blueslip.debug("Narrowed", {
operators: operators.map((e) => e.operator),