diff --git a/web/src/stream_color.js b/web/src/stream_color.js index a6d338e9c1..8443b30220 100644 --- a/web/src/stream_color.js +++ b/web/src/stream_color.js @@ -68,7 +68,7 @@ export function set_colorpicker_color(colorpicker, color) { }); } -export function update_stream_color(sub, color, {update_historical = false} = {}) { +export function update_stream_color(sub, color) { sub.color = color; const stream_id = sub.stream_id; // The swatch in the subscription row header. @@ -91,9 +91,7 @@ export function update_stream_color(sub, color, {update_historical = false} = {} )}'] .large-icon`, ).css("color", color); - if (update_historical) { - update_historical_message_color(sub.name, color); - } + update_historical_message_color(sub.name, color); update_stream_privacy_color(stream_id, color); message_view_header.colorize_message_view_header(); } diff --git a/web/src/stream_events.js b/web/src/stream_events.js index 4dcc805cdf..89bc98cb8c 100644 --- a/web/src/stream_events.js +++ b/web/src/stream_events.js @@ -41,7 +41,7 @@ export function update_property(stream_id, property, value, other_values) { switch (property) { case "color": - stream_color.update_stream_color(sub, value, {update_historical: true}); + stream_color.update_stream_color(sub, value); break; case "in_home_view": // Legacy in_home_view events are only sent as duplicates of @@ -117,7 +117,7 @@ export function mark_subscribed(sub, subscribers, color) { // If the backend sent us a color, use that if (color !== undefined && sub.color !== color) { sub.color = color; - stream_color.update_stream_color(sub, color, {update_historical: true}); + stream_color.update_stream_color(sub, color); } else if (sub.color === undefined) { // If the backend didn't, and we have a color already, send // the backend that color. It's not clear this code path is