Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream_color: Fix stream icon color not changing on theme change.

Aman Agrawal4d84ed305e5b
diff --git a/web/src/inbox_util.ts b/web/src/inbox_util.ts
index 23360a767a3..6d4821f675d 100644
--- a/web/src/inbox_util.ts
+++ b/web/src/inbox_util.ts
@@ -27,6 +27,12 @@ export function update_stream_colors(): void {
}
const color = stream_data.get_color(stream_id);
const background_color = stream_color.get_recipient_bar_color(color);
+
+ const $stream_privacy_icon = $stream_header.find(".stream-privacy");
+ if ($stream_privacy_icon.length) {
+ $stream_privacy_icon.css("color", stream_color.get_stream_privacy_icon_color(color));
+ }
+
$stream_header.css("background", background_color);
});
}
diff --git a/web/src/stream_color.ts b/web/src/stream_color.ts
index b781e45c838..027923a9e57 100644
--- a/web/src/stream_color.ts
+++ b/web/src/stream_color.ts
@@ -20,6 +20,12 @@ export function update_stream_recipient_color($stream_header: JQuery): void {
}
const stream_color = stream_data.get_color(stream_id);
const recipient_bar_color = get_recipient_bar_color(stream_color);
+
+ const $stream_privacy_icon = $stream_header.find(".stream-privacy");
+ if ($stream_privacy_icon.length) {
+ $stream_privacy_icon.css("color", get_stream_privacy_icon_color(stream_color));
+ }
+
$stream_header
.find(".message-header-contents")
.css("background-color", recipient_bar_color);