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 collapsed note missing user only has unread DMs.

Aman Agrawald1cedb7f1d86
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index 0909f82d1f6..557cfe6dd85 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -1352,14 +1352,16 @@ function should_show_all_folders_collapsed_note(): boolean {
// Some DM content is visible.
return false;
}
+ // Defined just for code reading clarity.
+ const has_visible_but_collapsed_dm_folder = has_visible_dm_folder;
const visible_folders = [...channel_folders_dict.values()].filter(
(folder) => folder.is_header_visible,
);
if (visible_folders.length === 0) {
- // Nothing at all is visible; the empty inbox message takes
- // precedence.
- return false;
+ // Nothing at all is visible; unless there is a visible but collapsed
+ // DM folder, we show the empty inbox message.
+ return has_visible_but_collapsed_dm_folder;
}
// At least one uncollapsed row is visible in some folder.