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_edit_toggler: Remove setup_stream_subscriptions_hash.

Sahil Batraaf7cfb677f61
diff --git a/web/src/stream_edit_toggler.ts b/web/src/stream_edit_toggler.ts
index 62751ca9a9c..ccf5a145a81 100644
--- a/web/src/stream_edit_toggler.ts
+++ b/web/src/stream_edit_toggler.ts
@@ -5,7 +5,6 @@ import * as components from "./components";
import * as hash_util from "./hash_util";
import {$t} from "./i18n";
import * as sub_store from "./sub_store";
-import type {StreamSubscription} from "./sub_store";
export let toggler: components.Toggle;
export let select_tab = "personal";
@@ -14,15 +13,6 @@ export function set_select_tab(right_side_tab: string): void {
select_tab = right_side_tab;
}
-export function setup_subscriptions_stream_hash(
- sub: StreamSubscription,
- right_side_tab: string,
-): void {
- const hash = hash_util.stream_edit_url(sub, right_side_tab);
- browser_history.update(hash);
- select_tab = right_side_tab;
-}
-
export function setup_toggler(): void {
toggler = components.toggle({
child_wants_focus: true,
@@ -39,7 +29,8 @@ export function setup_toggler(): void {
const stream_id = Number.parseInt($stream_header.attr("data-stream-id") ?? "", 10);
const sub = sub_store.get(stream_id);
if (sub) {
- setup_subscriptions_stream_hash(sub, select_tab);
+ const hash = hash_util.stream_edit_url(sub, select_tab);
+ browser_history.update(hash);
}
},
});