mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
stream_color: Remove redundant update_historical option.
This option has no significance anymore. Both the callers to this function pass it as `true`, so it is always true when it is being run.
This commit is contained in:
@@ -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;
|
sub.color = color;
|
||||||
const stream_id = sub.stream_id;
|
const stream_id = sub.stream_id;
|
||||||
// The swatch in the subscription row header.
|
// The swatch in the subscription row header.
|
||||||
@@ -91,9 +91,7 @@ export function update_stream_color(sub, color, {update_historical = false} = {}
|
|||||||
)}'] .large-icon`,
|
)}'] .large-icon`,
|
||||||
).css("color", color);
|
).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);
|
update_stream_privacy_color(stream_id, color);
|
||||||
message_view_header.colorize_message_view_header();
|
message_view_header.colorize_message_view_header();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function update_property(stream_id, property, value, other_values) {
|
|||||||
|
|
||||||
switch (property) {
|
switch (property) {
|
||||||
case "color":
|
case "color":
|
||||||
stream_color.update_stream_color(sub, value, {update_historical: true});
|
stream_color.update_stream_color(sub, value);
|
||||||
break;
|
break;
|
||||||
case "in_home_view":
|
case "in_home_view":
|
||||||
// Legacy in_home_view events are only sent as duplicates of
|
// 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 the backend sent us a color, use that
|
||||||
if (color !== undefined && sub.color !== color) {
|
if (color !== undefined && sub.color !== color) {
|
||||||
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) {
|
} else if (sub.color === undefined) {
|
||||||
// If the backend didn't, and we have a color already, send
|
// If the backend didn't, and we have a color already, send
|
||||||
// the backend that color. It's not clear this code path is
|
// the backend that color. It's not clear this code path is
|
||||||
|
|||||||
Reference in New Issue
Block a user