channel_folders: Don't label section OTHER if there are no folders above it.

Fixes #35878.
This commit is contained in:
Evy Kassirer
2025-08-28 12:44:49 -07:00
committed by Tim Abbott
parent 71fcee5093
commit c52174a0a2
2 changed files with 10 additions and 1 deletions

View File

@@ -858,7 +858,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;

View File

@@ -223,6 +223,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];