From d1cedb7f1d86377ebf727dbf71aa7ffe3debc979 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Thu, 16 Oct 2025 12:44:27 +0530 Subject: [PATCH] inbox: Fix collapsed note missing user only has unread DMs. When there are only unread DMs and it is collapsed, the all rows collapsed not is not shown. This occurred since we didn't check for that. --- web/src/inbox_ui.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts index 0909f82d1f..557cfe6dd8 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.