stream_data: Move calls to update_calculated_fields to events layer.

This migrates what were effectively data update functions to be called
from the main stream_events handlers, instead of being called from the
view-update code in subs.js.
This commit is contained in:
Tim Abbott
2018-03-09 17:59:13 -08:00
parent cc2eb60ca5
commit c5904499db
2 changed files with 2 additions and 3 deletions

View File

@@ -105,6 +105,7 @@ exports.mark_subscribed = function (sub, subscribers, color) {
if (subscribers) {
stream_data.set_subscribers(sub, subscribers);
}
stream_data.update_calculated_fields(sub);
if (overlays.streams_open()) {
subs.update_settings_for_subscribed(sub);
@@ -128,7 +129,7 @@ exports.mark_unsubscribed = function (sub) {
return;
} else if (sub.subscribed) {
stream_data.unsubscribe_myself(sub);
stream_data.update_calculated_fields(sub);
if (overlays.streams_open()) {
subs.update_settings_for_unsubscribed(sub);
}