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.

narrow_state: Change source of truth for is_message_feed_visible.

Aman Agrawald10d72e6a9ed
diff --git a/web/src/narrow_state.ts b/web/src/narrow_state.ts
index 1cdc9ae64aa..0dd4276d59d 100644
--- a/web/src/narrow_state.ts
+++ b/web/src/narrow_state.ts
@@ -1,10 +1,8 @@
import * as blueslip from "./blueslip";
import {Filter} from "./filter";
-import * as inbox_util from "./inbox_util";
import * as message_lists from "./message_lists";
import {page_params} from "./page_params";
import * as people from "./people";
-import * as recent_view_util from "./recent_view_util";
import type {NarrowTerm} from "./state_data";
import * as stream_data from "./stream_data";
import type {StreamSubscription} from "./sub_store";
@@ -32,7 +30,11 @@ export function search_terms(current_filter: Filter | undefined = filter()): Nar
}
export function is_message_feed_visible(): boolean {
- return !recent_view_util.is_visible() && !inbox_util.is_visible();
+ // It's important that `message_lists.current` is the
+ // source of truth for this since during the initial app load,
+ // `message_lists.current` is `undefined` and we don't want
+ // to return `true` if we haven't loaded the message feed yet.
+ return message_lists.current !== undefined;
}
export function update_email(