mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 23:19:10 +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() {
|
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.
|
// Hide selected elements in the left sidebar.
|
||||||
top_left_corner.narrow_to_recent_topics();
|
top_left_corner.narrow_to_recent_topics();
|
||||||
stream_list.handle_narrow_deactivated();
|
stream_list.handle_narrow_deactivated();
|
||||||
|
|||||||
Reference in New Issue
Block a user