signal-desktop/ts/shims/themeChanged.ts

12 lines
349 B
TypeScript
Raw Normal View History

2021-08-18 20:08:14 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export function themeChanged(): void {
if (window.reduxActions && window.reduxActions.user) {
const theme = window.Events.getThemeSetting();
window.reduxActions.user.userChanged({
theme: theme === 'system' ? window.systemTheme : theme,
});
}
}