diff --git a/frontend_tests/node_tests/narrow_activate.js b/frontend_tests/node_tests/narrow_activate.js index 424f07f7bf..b12fc189bc 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 66fb5e1625..1035bb1554 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),