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.

stream_settings: Fix incorrect use of translated strings in conditions.

Aman Agrawal3429898dbf3a
diff --git a/web/src/stream_settings_ui.ts b/web/src/stream_settings_ui.ts
index ef9605011c2..3fdb73c1a5d 100644
--- a/web/src/stream_settings_ui.ts
+++ b/web/src/stream_settings_ui.ts
@@ -1070,26 +1070,26 @@ export function keyboard_sub(): void {
export function toggle_view(event: string): void {
const active_data = stream_settings_components.get_active_data();
- const stream_filter_tab = active_data.$tabs.first().text();
+ const stream_filter_tab_key = active_data.$tabs.first().attr("data-tab-key");
assert(toggler !== undefined);
switch (event) {
case "right_arrow":
- switch (stream_filter_tab) {
- case "Subscribed":
+ switch (stream_filter_tab_key) {
+ case "subscribed":
toggler.goto("not-subscribed");
break;
- case "Not subscribed":
+ case "not-subscribed":
toggler.goto("all-streams");
break;
}
break;
case "left_arrow":
- switch (stream_filter_tab) {
- case "Not subscribed":
+ switch (stream_filter_tab_key) {
+ case "not-subscribed":
toggler.goto("subscribed");
break;
- case "All channels":
+ case "all-streams":
toggler.goto("not-subscribed");
break;
}