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.

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

Evy Kassirerc52174a0a273
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index cc847d53424..4fc871add44 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -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;
diff --git a/web/src/stream_list_sort.ts b/web/src/stream_list_sort.ts
index 60e3d0c250d..d58336bc8be 100644
--- a/web/src/stream_list_sort.ts
+++ b/web/src/stream_list_sort.ts
@@ -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];