decord/source/modules/themes/resolveTheme.native.tsx

72 lines
2.8 KiB
TypeScript
Raw Normal View History

// Module ID: 1227
// Function ID: 1228
2026-07-20 16:05:17 +00:00
// Name: resolveTheme
// Dependencies: [1228, 1184, 1185, 1221, 1186, 7770, 1229, 1187, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 1227 (resolveTheme)
import AuthenticationUtils from "AuthenticationUtils" /* 7770 */;
import CustomThemeMobileStore from "CustomThemeMobileStore" /* 1228 */;
import SelectivelySyncedUserSettingsStore from "SelectivelySyncedUserSettingsStore" /* 1184 */;
import UnsyncedUserSettingsStore from "UnsyncedUserSettingsStore" /* 1185 */;
import UserSettingsProtoStore from "UserSettingsProtoStore" /* 1221 */;
2026-07-23 10:11:24 +00:00
require = fn;
const ThemeConstants = fn(1186);
({ PROTO_THEME_MAP_MOBILE_REFRESH: metroRequire, SystemTheme: closure_7, SystemThemeState: closure_8 } = ThemeConstants);
const size = fn(2);
const result = size.fileFinishedImporting("modules/themes/resolveTheme.native.tsx");
2026-07-20 16:05:17 +00:00
export default function resolveTheme(arg0, arg1) {
const previewTheme = CustomThemeMobileStore.getPreviewTheme();
2026-07-20 16:05:17 +00:00
if (undefined !== previewTheme) {
return previewTheme.baseTheme;
} else {
2026-08-31 15:47:37 +00:00
if (!obj6.isAuthenticated()) {
2026-07-20 16:05:17 +00:00
if (arg0 !== constants.NO_PREFERENCE) {
return tmp17(1229).resolveThemeWithCustomSettings(arg1[arg0], CustomThemeMobileStore.getCustomTheme());
2026-07-20 16:05:17 +00:00
}
}
const appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings();
2026-07-20 16:05:17 +00:00
let theme;
2026-07-29 08:29:29 +00:00
if (appearanceSettings != null) {
2026-07-20 16:05:17 +00:00
theme = appearanceSettings.theme;
}
const appearance = UserSettingsProtoStore.settings.appearance;
2026-08-11 06:20:06 +00:00
if (null != appearanceSettings) {
const clientThemeSettings2 = appearanceSettings.clientThemeSettings;
let prop;
if (clientThemeSettings2 != null) {
prop = clientThemeSettings2.customUserThemeSettings;
}
let customUserThemeSettings = prop;
} else if (appearance != null) {
const clientThemeSettings = appearance.clientThemeSettings;
if (clientThemeSettings != null) {
customUserThemeSettings = clientThemeSettings.customUserThemeSettings;
}
}
2026-07-20 16:05:17 +00:00
if (null != theme) {
return tmp17(1229).resolveThemeWithCustomSettings(theme, customUserThemeSettings);
2026-07-20 16:05:17 +00:00
} else {
let theme1;
2026-07-29 08:29:29 +00:00
if (appearance != null) {
2026-07-20 16:05:17 +00:00
theme1 = appearance.theme;
}
2026-07-29 08:29:29 +00:00
if (theme1 == null) {
theme1 = tmp17(1187).Theme.UNSET;
2026-07-20 16:05:17 +00:00
}
if (theme1 === tmp17(1187).Theme.UNSET) {
2026-07-20 16:05:17 +00:00
if (arg0 !== constants.NO_PREFERENCE) {
let themeWithCustomSettings = tmp17(1229).resolveThemeWithCustomSettings(arg1[arg0], customUserThemeSettings);
const tmp17Result5 = tmp17(1229);
2026-07-20 16:05:17 +00:00
}
2026-08-31 15:47:37 +00:00
return themeWithCustomSettings;
2026-07-20 16:05:17 +00:00
}
themeWithCustomSettings = tmp17(1229).resolveThemeWithCustomSettings(timestampProducer[theme1], customUserThemeSettings);
const tmp17Result6 = tmp17(1229);
2026-07-20 16:05:17 +00:00
}
obj6 = AuthenticationUtils;
2026-07-20 16:05:17 +00:00
}
};