mirror of https://github.com/zulip/zulip.git
stream_ui_updates: Only update UI if the stream is being edited.
If the stream settings is open but the stream which was subscribed/unsubscribed wasn't open (say user unsubscribed from a different tab), `$settings_button` would be `undefined` here.
This commit is contained in:
parent
173e5389af
commit
a47d204ca0
|
@ -70,6 +70,10 @@ export function enable_or_disable_subscribers_tab(sub) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update_settings_button_for_sub(sub) {
|
export function update_settings_button_for_sub(sub) {
|
||||||
|
if (!hash_util.is_editing_stream(sub.stream_id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// This is for the Subscribe/Unsubscribe button in the right panel.
|
// This is for the Subscribe/Unsubscribe button in the right panel.
|
||||||
const $settings_button = stream_settings_ui.settings_button_for_sub(sub);
|
const $settings_button = stream_settings_ui.settings_button_for_sub(sub);
|
||||||
if (sub.subscribed) {
|
if (sub.subscribed) {
|
||||||
|
|
Loading…
Reference in New Issue