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.

recent_topics: Avoid unnecessary rerenders via repeated Esc.

Tim Abbottcf69ce166c02
diff --git a/static/js/recent_topics.js b/static/js/recent_topics.js
index a89a9578dd6..00a80c76bca 100644
--- a/static/js/recent_topics.js
+++ b/static/js/recent_topics.js
@@ -631,6 +631,11 @@ export function is_visible() {
}
export function show() {
+ if (is_visible()) {
+ // If we're already visible, E.g. because the user hit Esc
+ // while already in the recent topics view, do nothing.
+ return;
+ }
// Hide selected elements in the left sidebar.
top_left_corner.narrow_to_recent_topics();
stream_list.handle_narrow_deactivated();