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.

inbox: Fix calls to is_complete_for_stream_id.

Tim Abbotte298eddefcdb
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index d6ceb33100a..2925d77b8a3 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -942,7 +942,7 @@ class InboxTopicListWidget extends TopicListWidget {
get_min_load_count,
});
- if (!stream_topic_history.is_complete_for_stream_id(this.my_stream_id)) {
+ if (!stream_topic_history.has_history_for(this.my_stream_id)) {
show_channel_view_loading_indicator();
stream_topic_history_util.get_server_history(this.my_stream_id, () => {
if (channel_view_topic_widget?.get_stream_id() !== this.my_stream_id) {
diff --git a/web/src/unread.ts b/web/src/unread.ts
index f9ec0afcaea..9b891b9d5b4 100644
--- a/web/src/unread.ts
+++ b/web/src/unread.ts
@@ -354,10 +354,10 @@ class UnreadTopicCounter {
stream_id: number;
topic_dict: FoldDict<TopicHistoryEntry>;
}): {pretty_name: string; message_id: number}[] {
- /* Clients have essentially complete unread data, but
- * stream_topic_history.is_complete_for_stream_id() can be
- * false. In that situation, this function helps ensure that
- * we include all topics with unread messages in data that.
+ /* Clients have essentially complete unread data. If we don't
+ * yet have full topic history for the channel, we need to
+ * display the union of topics with unread messages and locally
+ * available topic history data.
*
* It will return all topics in the provided stream with a
* nonzero unread count that are not already present in the