Adjust some types

This commit is contained in:
Josh Perez
2022-07-12 20:37:21 -04:00
committed by GitHub
parent 9ce4b8977d
commit d7307934bc
15 changed files with 223 additions and 175 deletions

18
ts/util/getThemeType.ts Normal file
View File

@@ -0,0 +1,18 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { ThemeType } from '../types/Util';
export function getThemeType(): ThemeType {
const themeSetting = window.Events.getThemeSetting();
if (themeSetting === 'light') {
return ThemeType.light;
}
if (themeSetting === 'dark') {
return ThemeType.dark;
}
return window.systemTheme;
}