inbox: Fix calls to is_complete_for_stream_id.

The call from the inbox code was asking the wrong question -- it wants
to know if we've fetched full topic data to know whether to ask for
it. The new name for the function moved in
7d55ad3c13 helped reveal it.

There also was a mention in a comment that was half-baked; wrote the
comment properly.
This commit is contained in:
Tim Abbott
2025-06-19 13:03:52 -07:00
parent 2abe4ad18b
commit e298eddefc
2 changed files with 5 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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