mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
streams: Fix stream color synchronization.
Previously, when a new stream was created on a client other than the current one, the browser would first receive the "stream_created" event, and make up a client-side display color at that time to use in the "stream settings" view (it doesn't yet know the color that was selected when the user was actually subscribed, because it doesn't even know yet that the user is being subscribed to this stream), and then moments after it'll receive a "susbcribe" event letting the client know that the user is subscribed (and specifying the color to use). However, due to an argument not being passed through properly and a missing rerender, we were not properly updating either the data structures or doing a stream colors rerender in order to show the new color. This fixes the issue reported in https://chat.zulip.org/#narrow/stream/48-mobile/subject/stream.20colors/near/660170
This commit is contained in:
@@ -296,7 +296,7 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
|
||||
var sub = stream_data.get_sub_by_id(rec.stream_id);
|
||||
if (sub) {
|
||||
stream_data.update_stream_email_address(sub, rec.email_address);
|
||||
stream_events.mark_subscribed(sub, rec.subscribers);
|
||||
stream_events.mark_subscribed(sub, rec.subscribers, rec.color);
|
||||
} else {
|
||||
blueslip.error('Subscribing to unknown stream with ID ' + rec.stream_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user