From 4e3ec18c8abf5519e94f2185517be0832de6c482 Mon Sep 17 00:00:00 2001 From: Evy Kassirer Date: Thu, 28 Aug 2025 12:44:49 -0700 Subject: [PATCH] channel_folders: Don't label section OTHER if there are no folders above it. Fixes #35878. (cherry picked from commit c52174a0a273c0505090064a7654fba98ba5ae7d) --- web/src/inbox_ui.ts | 2 +- web/src/stream_list_sort.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts index a47da6634e..b5a2afdca6 100644 --- a/web/src/inbox_ui.ts +++ b/web/src/inbox_ui.ts @@ -859,7 +859,7 @@ function get_folder_name_from_id(folder_id: number): string { } if (folder_id === OTHER_CHANNELS_FOLDER_ID) { - return $t({defaultMessage: "CHANNELS"}); + return $t({defaultMessage: "OTHER CHANNELS"}); } return channel_folders.get_channel_folder_by_id(folder_id).name; diff --git a/web/src/stream_list_sort.ts b/web/src/stream_list_sort.ts index b280deb9b6..7f7aadfdc8 100644 --- a/web/src/stream_list_sort.ts +++ b/web/src/stream_list_sort.ts @@ -234,6 +234,15 @@ export function sort_groups( (section_a, section_b) => section_a.order! - section_b.order!, ); + if ( + pinned_section.streams.length > 0 || + pinned_section.muted_streams.length > 0 || + pinned_section.inactive_streams.length > 0 || + folder_sections.size > 0 + ) { + normal_section.section_title = $t({defaultMessage: "OTHER"}); + } + // This needs to have the same ordering as the order they're displayed in the sidebar. const new_sections = [pinned_section, ...folder_sections_sorted, normal_section];