stream_settings: Make the right panel empty according to the URL hash.

We now make the right panel empty if the URL hash is changed to
"#streams/all" or "#streams/subscribed" either manually or by
using the browser back button.

We call the function to make the right panel empty in change_state
and not in the callback function for toggler.goto because the right
panel empty becomes empty due to change in hash and not due to
toggling between subscribed and all streams.
This commit is contained in:
Sahil Batra
2024-01-05 15:21:25 +05:30
committed by Tim Abbott
parent 332d61f820
commit f3add07280
2 changed files with 11 additions and 2 deletions

View File

@@ -93,11 +93,15 @@ export function open_edit_panel_for_row(stream_row) {
setup_stream_settings(stream_row);
}
export function open_edit_panel_empty() {
const tab_key = stream_settings_components.get_active_data().$tabs.first().attr("data-tab-key");
export function empty_right_panel() {
$(".stream-row.active").removeClass("active");
$("#subscription_overlay .right").removeClass("show");
stream_settings_components.show_subs_pane.nothing_selected();
}
export function open_edit_panel_empty() {
const tab_key = stream_settings_components.get_active_data().$tabs.first().attr("data-tab-key");
empty_right_panel();
setup_subscriptions_tab_hash(tab_key);
}