mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
subs: Don't try to update stream settings UI when closed.
The recent fixes we made to make stream settings update properly when doing live updates were great, but they would throw an exception if the stream settings overlay wasn't open. This fixes that by adding the appropriate check.
This commit is contained in:
@@ -106,8 +106,8 @@ exports.mark_subscribed = function (sub, subscribers, color) {
|
||||
stream_data.set_subscribers(sub, subscribers);
|
||||
}
|
||||
|
||||
subs.update_settings_for_subscribed(sub);
|
||||
if (overlays.streams_open()) {
|
||||
subs.update_settings_for_subscribed(sub);
|
||||
subs.actually_filter_streams();
|
||||
}
|
||||
|
||||
@@ -129,8 +129,9 @@ exports.mark_unsubscribed = function (sub) {
|
||||
} else if (sub.subscribed) {
|
||||
stream_data.unsubscribe_myself(sub);
|
||||
|
||||
if (overlays.streams_open()) {
|
||||
subs.update_settings_for_unsubscribed(sub);
|
||||
|
||||
}
|
||||
} else {
|
||||
// Already unsubscribed
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user