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:
Tim Abbott
2017-10-23 22:43:00 -07:00
parent bdc7772bab
commit 9d0e1a2e0c

View File

@@ -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;