72 lines
2.7 KiB
TypeScript
72 lines
2.7 KiB
TypeScript
// Module ID: 1227
|
|
// Function ID: 1228
|
|
// Name: resolveTheme
|
|
// Dependencies: [1228, 1184, 1185, 1221, 1186, 7668, 1229, 1187, 2]
|
|
// Exports: default
|
|
|
|
// Module 1227 (resolveTheme)
|
|
import getToken from "getToken" /* 7668 */;
|
|
import closure_2 from "reset" /* 1228 */;
|
|
import closure_3 from "initialize" /* 1184 */;
|
|
import closure_4 from "CHANNEL_SIDEBAR_WIDTH" /* 1185 */;
|
|
import closure_5 from "handleConnectionClosedOrResumed" /* 1221 */;
|
|
import SystemThemeState from "SystemThemeState" /* 1186 */;
|
|
|
|
require = arg1;
|
|
({ PROTO_THEME_MAP_MOBILE_REFRESH: closure_6, SystemTheme: error, SystemThemeState: closure_8 } = SystemThemeState);
|
|
const result = require("set").fileFinishedImporting("modules/themes/resolveTheme.native.tsx");
|
|
|
|
export default function resolveTheme(arg0, arg1) {
|
|
previewTheme = previewTheme.getPreviewTheme();
|
|
if (undefined !== previewTheme) {
|
|
return previewTheme.baseTheme;
|
|
} else {
|
|
if (!obj6.isAuthenticated()) {
|
|
if (arg0 !== constants.NO_PREFERENCE) {
|
|
let tmp17Result = tmp17(1229);
|
|
return tmp17Result.resolveThemeWithCustomSettings(arg1[arg0], previewTheme.getCustomTheme());
|
|
}
|
|
}
|
|
appearanceSettings = appearanceSettings.getAppearanceSettings();
|
|
let theme;
|
|
if (appearanceSettings != null) {
|
|
theme = appearanceSettings.theme;
|
|
}
|
|
const appearance = settings.settings.appearance;
|
|
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;
|
|
}
|
|
}
|
|
if (null != theme) {
|
|
tmp17Result = tmp17(1229);
|
|
return tmp17Result.resolveThemeWithCustomSettings(theme, customUserThemeSettings);
|
|
} else {
|
|
let theme1;
|
|
if (appearance != null) {
|
|
theme1 = appearance.theme;
|
|
}
|
|
if (theme1 == null) {
|
|
theme1 = tmp17(1187).Theme.UNSET;
|
|
}
|
|
if (theme1 === tmp17(1187).Theme.UNSET) {
|
|
if (arg0 !== constants.NO_PREFERENCE) {
|
|
let themeWithCustomSettings = tmp17(1229).resolveThemeWithCustomSettings(arg1[arg0], customUserThemeSettings);
|
|
const tmp17Result1 = tmp17(1229);
|
|
}
|
|
return themeWithCustomSettings;
|
|
}
|
|
themeWithCustomSettings = tmp17(1229).resolveThemeWithCustomSettings(table[theme1], customUserThemeSettings);
|
|
const tmp17Result2 = tmp17(1229);
|
|
}
|
|
obj6 = getToken;
|
|
}
|
|
};
|