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

60 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1345
// Function ID: 1346
2026-07-20 16:05:17 +00:00
// Name: resolveTheme
2026-07-29 08:29:29 +00:00
// Dependencies: [1346, 1303, 1304, 1340, 1305, 1352, 1306, 1348, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 1345 (resolveTheme)
import reset from "reset";
import initialize from "initialize";
import CHANNEL_SIDEBAR_WIDTH from "CHANNEL_SIDEBAR_WIDTH";
import handleConnectionClosedOrResumed from "handleConnectionClosedOrResumed";
2026-07-23 10:11:24 +00:00
import SystemThemeState from "SystemThemeState";
2026-07-29 08:29:29 +00:00
let c9;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ PROTO_THEME_MAP_MOBILE: closure_6, PROTO_THEME_MAP_MOBILE_REFRESH: error, SystemTheme: metroImportAll, SystemThemeState: c9 } = SystemThemeState);
const result = require("CHANNEL_SIDEBAR_WIDTH").fileFinishedImporting("modules/themes/resolveTheme.native.tsx");
2026-07-20 16:05:17 +00:00
export default function resolveTheme(arg0, arg1) {
2026-07-23 10:11:24 +00:00
previewTheme = previewTheme.getPreviewTheme();
2026-07-20 16:05:17 +00:00
if (undefined !== previewTheme) {
return previewTheme.baseTheme;
} else {
if (!obj2.isAuthenticated()) {
if (arg0 !== constants.NO_PREFERENCE) {
return arg1[arg0];
}
}
2026-07-23 10:11:24 +00:00
appearanceSettings = appearanceSettings.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;
}
if (null != theme) {
return theme;
} else {
const appearance = settings.settings.appearance;
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 = tmp14(1306).Theme.UNSET;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (theme1 === tmp14(1306).Theme.UNSET) {
2026-07-20 16:05:17 +00:00
if (arg0 !== constants.NO_PREFERENCE) {
2026-07-29 08:29:29 +00:00
let tmp10 = arg1[arg0];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp10 = tmp14(1348).isMobileVisualRefreshEnabled("resolveTheme") ? closure_7 : closure_6[theme1];
const tmp14Result = tmp14(1348);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2 = require(1352) /* getToken */;
2026-07-20 16:05:17 +00:00
}
};