recent_topics: Use is_visible for testing if RT is rendered.

We don't want to rely on browser hash to check if RT is visible
because soon we want to display default_view without any hash
and RT may or may not be visible in that hash.
This commit is contained in:
Aman Agrawal
2021-03-15 09:31:31 +00:00
committed by Tim Abbott
parent 1e63282cc2
commit f95443ac8f
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,6 @@ import * as compose from "./compose";
import * as compose_closed_ui from "./compose_closed_ui";
import * as compose_state from "./compose_state";
import * as hash_util from "./hash_util";
import * as hashchange from "./hashchange";
import * as ListWidget from "./list_widget";
import {localstorage} from "./localstorage";
import * as message_store from "./message_store";
@@ -75,7 +74,7 @@ export function is_in_focus() {
// Check if user is focused on
// recent topics.
return (
hashchange.in_recent_topics_hash() &&
is_visible() &&
!compose_state.composing() &&
!popovers.any_active() &&
!overlays.is_active() &&