Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
narrow: Check if coming for `All messages` narrow when deactivating.
Aman Agrawal45491710b742
diff --git a/web/src/hashchange.js b/web/src/hashchange.jsindex fb69142ed66..e3238ca21aa 100644--- a/web/src/hashchange.js+++ b/web/src/hashchange.js@@ -110,7 +110,7 @@ export function save_narrow(operators) {function show_all_message_view() {const coming_from_recent_view = maybe_hide_recent_view();const is_actively_scrolling = message_scroll.is_actively_scrolling();- narrow.deactivate(coming_from_recent_view, is_actively_scrolling);+ narrow.deactivate(!coming_from_recent_view, is_actively_scrolling);left_sidebar_navigation_area.handle_narrow_deactivated();// We need to maybe scroll to the selected message// once we have the proper viewport set updiff --git a/web/src/narrow.js b/web/src/narrow.jsindex 09d2cfede6b..b98e93c9b29 100644--- a/web/src/narrow.js+++ b/web/src/narrow.js@@ -1007,7 +1007,7 @@ function handle_post_narrow_deactivate_processes() {message_feed_top_notices.update_top_of_narrow_notices(message_lists.home);}-export function deactivate(coming_from_recent_view = false, is_actively_scrolling = false) {+export function deactivate(coming_from_all_messages = true, is_actively_scrolling = false) {// NOTE: Never call this function independently,// always use browser_history.go_to_location("#all_messages") to// activate All message narrow.@@ -1026,7 +1026,7 @@ export function deactivate(coming_from_recent_view = false, is_actively_scrollinsearch.clear_search_form();// Both All messages and Recent Conversations have `undefined` filter.// Return if already in the All message narrow.- if (narrow_state.filter() === undefined && !coming_from_recent_view) {+ if (narrow_state.filter() === undefined && coming_from_all_messages) {return;}blueslip.debug("Unnarrowed");