mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 12:54:58 +00:00
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:
@@ -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() &&
|
||||
|
||||
Reference in New Issue
Block a user