Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
narrow: Move clear_message_sent_banners into reset_ui_state.
evykassirer43120709f73a
diff --git a/web/src/narrow.js b/web/src/narrow.jsindex a5771841268..c79bb3e0388 100644--- a/web/src/narrow.js+++ b/web/src/narrow.js@@ -70,6 +70,9 @@ export function reset_ui_state() {unread_ui.reset_unread_banner();// We sometimes prevent draft restoring until the narrow resets.compose_state.allow_draft_restoring();+ // Most users aren't going to send a bunch of a out-of-narrow messages+ // and expect to visit a list of narrows, so let's get these out of the way.+ compose_banner.clear_message_sent_banners();}export function changehash(newhash) {@@ -372,10 +375,6 @@ export function activate(raw_terms, opts) {message_lists.save_pre_narrow_offset_for_reload();}- // most users aren't going to send a bunch of a out-of-narrow messages- // and expect to visit a list of narrows, so let's get these out of the way.- compose_banner.clear_message_sent_banners();-// Open tooltips are only interesting for current narrow,// so hide them when activating a new one.$(".tooltip").hide();diff --git a/web/tests/narrow_activate.test.js b/web/tests/narrow_activate.test.jsindex 02fcfc7d7fc..5ba1bb96bc6 100644--- a/web/tests/narrow_activate.test.js+++ b/web/tests/narrow_activate.test.js@@ -229,8 +229,8 @@ run_test("basics", ({override}) => {helper.assert_events([[message_feed_top_notices, "hide_top_of_narrow_notices"],[message_feed_loading, "hide_indicators"],- [message_lists, "save_pre_narrow_offset_for_reload"],[compose_banner, "clear_message_sent_banners"],+ [message_lists, "save_pre_narrow_offset_for_reload"],[compose_actions, "on_narrow"],[unread_ops, "process_visible"],[narrow_history, "save_narrow_state_and_flush"],