signal-desktop/ts/shims/themeChanged.ts

12 lines
347 B
TypeScript
Raw Normal View History

2023-01-03 19:55:46 +00:00
// Copyright 2021 Signal Messenger, LLC
2021-08-18 20:08:14 +00:00
// SPDX-License-Identifier: AGPL-3.0-only
2022-07-13 00:37:21 +00:00
import { getThemeType } from '../util/getThemeType';
export async function themeChanged(): Promise<void> {
2021-08-18 20:08:14 +00:00
if (window.reduxActions && window.reduxActions.user) {
const theme = await getThemeType();
2022-07-13 00:37:21 +00:00
window.reduxActions.user.userChanged({ theme });
2021-08-18 20:08:14 +00:00
}
}