mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +00:00 
			
		
		
		
	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:
		| @@ -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); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user