message_list: Update recipient bar color on theme change.

This commit is contained in:
Aman Agrawal
2023-04-07 23:59:47 +00:00
committed by Tim Abbott
parent 4b35164bca
commit 3711d0ae69
3 changed files with 14 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import {Filter} from "./filter";
import * as message_list from "./message_list";
import * as recent_topics_util from "./recent_topics_util";
import * as ui_util from "./ui_util";
export let home;
export let current;
@@ -30,4 +31,8 @@ export function initialize() {
excludes_muted_topics: true,
});
current = home;
// For users with automatic color scheme, we need to detect change
// in `prefers-color-scheme`as it changes based on time.
ui_util.listener_for_preferred_color_scheme_change(update_recipient_bar_background_color);
}