signal-desktop/ts/shims/themeChanged.ts

12 lines
347 B
TypeScript
Raw Normal View History

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