Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
narrow: Explicitly hide recent topics when changing narrow.
Aman Agrawalb5036cd3b380
diff --git a/frontend_tests/node_tests/narrow_activate.js b/frontend_tests/node_tests/narrow_activate.jsindex 75c3f070003..23bbad099c8 100644--- a/frontend_tests/node_tests/narrow_activate.js+++ b/frontend_tests/node_tests/narrow_activate.js@@ -49,6 +49,10 @@ set_global("search_pill_widget", {},},});+set_global("recent_topics", {+ hide: () => {},+ is_visible: () => {},+});//// We have strange hacks in narrow.activate to sleep 0diff --git a/static/js/narrow.js b/static/js/narrow.jsindex 3f4dfab4d5d..37acbff4bf1 100644--- a/static/js/narrow.js+++ b/static/js/narrow.js@@ -149,6 +149,10 @@ exports.activate = function (raw_operators, opts) {or rerendering due to server-side changes.*/+ if (recent_topics.is_visible()) {+ recent_topics.hide();+ }+const start_time = new Date();const was_narrowed_already = narrow_state.active();// most users aren't going to send a bunch of a out-of-narrow messages