mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 07:21:23 +00:00
recent_topics: Avoid unnecessary rerenders via repeated Esc.
This also prevents unnecessary rerenders when changing the URL between "#recent_topics" and "#" when it's the default view.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user