Skip to content

Commit

Permalink
stream_color: Fix stream icon color not changing on theme change.
Browse files Browse the repository at this point in the history
Changing theme didn't change the color of the stream icons.
  • Loading branch information
amanagr authored and timabbott committed Jun 22, 2024
1 parent 00240b6 commit 4d84ed3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/src/inbox_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
6 changes: 6 additions & 0 deletions web/src/stream_color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d84ed3

Please sign in to comment.