This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,93 +1,102 @@
/* Metro module 13109; source: modules/themes/RootThemeContextProvider.native.tsx; dependencies: [31, 4502, 1310, 482, 33, 566, 4003, 1357, 13110, 3868, 10901, 2] */
import ThemeStore from '../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import UseColorThemeBackground from '../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
import AccessibilityStore from '../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as MobileVisualRefreshExperimentModule from './experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as RootThemeContextProviderNativeModule from '../../design/components/ThemeContextProvider/native/RootThemeContextProvider.native.tsx'; /* Metro dependency 10901 */
import * as ManaTypeConsolidationExperimentModule from '../design/ManaTypeConsolidationExperiment.tsx'; /* Metro dependency 13110 */
function _fun100182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:6, offset: 0x021e0717, size: 196 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_6 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/RootThemeContextProvider.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/RootThemeContextProvider.native.tsx');
exports.RootThemeContextProvider = RootThemeContextProvider_100183;
}
function RootThemeContextProvider_100183({children}) { // fn#100183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:273, offset: 0x021e07db, size: 623 bytes, params: 2, frame: 24
var r1;
var r12;
var r11;
var r8;
var moduleValue4;
var moduleValue5;
var moduleValue6;
var moduleValue7;
const {saturation, contrast,
theme} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AccessibilityStore,
ThemeStore], function() {
return {saturation: AccessibilityStore.saturation, contrast: AccessibilityStore.contrast,
theme: ThemeStore.theme};
});
const value3 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const {enabled, chatInputFloating,
chatInputLegacySendButton} = (require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */).useMobileVisualRefreshConfig({location: 'RootThemeContextProvider'});
const value5 = (require(13110) /* metro dependency 13110: ManaTypeConsolidationExperiment */).useManaTypeConsolidationExperiment('RootThemeContextProvider');
const value6 = value5.useMemo(_fun100185, [enabled, chatInputFloating, chatInputLegacySendButton, value5]);
if (value3 != null) {
if (value3.theme === ThemeTypes.LIGHT) {
moduleValue5 = require(3868) /* metro dependency 3868: native */;
r1 = moduleValue5.setThemeFlag(0,
(require(3868) /* metro dependency 3868: native */).ThemeContextFlags.MOBILE_LIGHT_GRADIENT_THEME_ENABLED);
function RootThemeContextProvider_100183({children}) { // fn#100183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:273, offset: 0x021e07db, size: 623 bytes, params: 2, frame: 24
var r1;
var r12;
var r11;
var r8;
var moduleValue4;
var moduleValue5;
var moduleValue6;
var moduleValue7;
const {saturation, contrast,
theme} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AccessibilityStore,
ThemeStore], function() {
var accessibilityStoreBinding = AccessibilityStore;
return {saturation: accessibilityStoreBinding.saturation, contrast: accessibilityStoreBinding.contrast,
theme: ThemeStore.theme};
});
const value3 = (UseColorThemeBackground)();
const {enabled, chatInputFloating,
chatInputLegacySendButton} = (MobileVisualRefreshExperimentModule).useMobileVisualRefreshConfig({location: 'RootThemeContextProvider'});
const value5 = (ManaTypeConsolidationExperimentModule).useManaTypeConsolidationExperiment('RootThemeContextProvider');
const value6 = value5.useMemo(_fun100185, [enabled, chatInputFloating, chatInputLegacySendButton, value5]);
if (value3 != null) {
if (value3.theme === ThemeTypes.LIGHT) {
moduleValue5 = require(3868) /* metro dependency 3868: native */;
r1 = moduleValue5.setThemeFlag(0,
(require(3868) /* metro dependency 3868: native */).ThemeContextFlags.MOBILE_LIGHT_GRADIENT_THEME_ENABLED);
} else {
moduleValue4 = require(3868) /* metro dependency 3868: native */;
r1 = moduleValue4.setThemeFlag(0,
(require(3868) /* metro dependency 3868: native */).ThemeContextFlags.MOBILE_DARK_GRADIENT_THEME_ENABLED);
}
r12 = r1;
} else {
moduleValue4 = require(3868) /* metro dependency 3868: native */;
r1 = moduleValue4.setThemeFlag(0,
(require(3868) /* metro dependency 3868: native */).ThemeContextFlags.MOBILE_DARK_GRADIENT_THEME_ENABLED);
r12 = 0;
}
r12 = r1;
} else {
r12 = 0;
if (saturation === 1) {
r11 = r12;
} else {
moduleValue6 = require(3868) /* metro dependency 3868: native */;
r11 = moduleValue6.setThemeFlag(r12,
(require(3868) /* metro dependency 3868: native */).ThemeContextFlags.REDUCE_SATURATION_ENABLED);
}
if (contrast === 1) {
r8 = r11;
} else {
moduleValue7 = require(3868) /* metro dependency 3868: native */;
r8 = moduleValue7.setThemeFlag(r11,
contrast > 1 ? (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.INCREASED_CONTRAST_ENABLED : (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.REDUCED_CONTRAST_ENABLED);
}
const RootThemeContextProvider = (RootThemeContextProviderNativeModule).RootThemeContextProvider;
return (
<RootThemeContextProvider
theme={theme}
flags={r8}
saturation={saturation}
contrast={contrast}
enabledExperiments={value6}
>
{children}
</RootThemeContextProvider>
);
function _fun100185() { // fn#100185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:713, offset: 0x021e0a7a, size: 116 bytes, params: 1, frame: 12
const items2 = [];
if (chatInputLegacySendButton) {
items2.push('mobile-visual-refresh-legacy-send-button');
}
if (chatInputFloating) {
items2.push('mobile-visual-refresh-floating');
}
if (enabled) {
items2.push('mobile-visual-refresh');
}
if (ReactModule) {
items2.push('mana-type-consolidation');
}
return items2.length > 0 ? items2 : undefined;
}
}
if (saturation === 1) {
r11 = r12;
} else {
moduleValue6 = require(3868) /* metro dependency 3868: native */;
r11 = moduleValue6.setThemeFlag(r12,
(require(3868) /* metro dependency 3868: native */).ThemeContextFlags.REDUCE_SATURATION_ENABLED);
}
if (contrast === 1) {
r8 = r11;
} else {
moduleValue7 = require(3868) /* metro dependency 3868: native */;
r8 = moduleValue7.setThemeFlag(r11,
contrast > 1 ? (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.INCREASED_CONTRAST_ENABLED : (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.REDUCED_CONTRAST_ENABLED);
}
const RootThemeContextProvider = (require(10901) /* metro dependency 10901: RootThemeContextProviderNative */).RootThemeContextProvider;
return (
<RootThemeContextProvider
theme={theme}
flags={r8}
saturation={saturation}
contrast={contrast}
enabledExperiments={value6}
>
{children}
</RootThemeContextProvider>
);
}
function _fun100185() { // fn#100185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:713, offset: 0x021e0a7a, size: 116 bytes, params: 1, frame: 12
const items2 = [];
if (chatInputLegacySendButton) {
items2.push('mobile-visual-refresh-legacy-send-button');
}
if (chatInputFloating) {
items2.push('mobile-visual-refresh-floating');
}
if (enabled) {
items2.push('mobile-visual-refresh');
}
if (env0_3) {
items2.push('mana-type-consolidation');
}
return items2.length > 0 ? items2 : undefined;
}
global.__d(_fun100182, 13109, [31, 4502, 1310, 482, 33, 566, 4003, 1357, 13110, 3868, 10901,
2]) /* metro module 13109, dependencies: [31, 4502, 1310, 482, 33, 566, 4003, 1357, 13110, 3868, 10901, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 1357; source: modules/themes/experiments/MobileVisualRefreshExperiment.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun15570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1484:6, offset: 0x00e363dd, size: 254 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'kind': 'user', 'name': '2026-02-mobile-visual-refresh', defaultConfig: {'enabled': false,
'chatInputFloating': false, 'chatInputLegacySendButton': false}, variations: {[0]: {'enabled': false,
'chatInputFloating': false, 'chatInputLegacySendButton': false}, [1]: {'enabled': true,
@@ -10,7 +13,7 @@ function _fun15570(global, require, importDefault, importAll, module, exports, d
'chatInputFloating': true, 'chatInputLegacySendButton': false}, [3]: {'enabled': true,
'chatInputFloating': true, 'chatInputLegacySendButton': false}, [4]: {'enabled': true,
'chatInputFloating': true, 'chatInputLegacySendButton': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/experiments/MobileVisualRefreshExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/experiments/MobileVisualRefreshExperiment.tsx');
exports.default = useIsMobileVisualRefreshExperimentEnabled;
exports.MobileVisualRefreshExperiment = value;
exports.useMobileVisualRefreshConfig = useMobileVisualRefreshConfig;
@@ -18,5 +21,22 @@ function _fun15570(global, require, importDefault, importAll, module, exports, d
exports.resolveRefreshToken = function(a0, a1) {
return a0.resolve({enabledExperiments: a1 ? ['mobile-visual-refresh'] : []});
};
function useIsMobileVisualRefreshExperimentEnabled(a0) { // fn#15571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1484:677, offset: 0x00e364db, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
}
function useMobileVisualRefreshConfig({location}) { // fn#15572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1484:838, offset: 0x00e364fd, size: 34 bytes, params: 2, frame: 12
return env0_0.useConfig({location: location});
}
function isMobileVisualRefreshEnabled(a0) { // fn#15573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1484:955, offset: 0x00e3651f, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: a0}]).enabled;
}
}
global.__d(_fun15570, 1357, [1358, 2]) /* metro module 1357, dependencies: [1358, 2] */;
@@ -1,10 +1,12 @@
/* Metro module 1347; source: modules/themes/getSystemTheme.native.tsx; dependencies: [27, 1313, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ThemeConstantsModule from '../user_settings/ThemeConstants.tsx'; /* Metro dependency 1313 */
function _fun15370(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1474:6, offset: 0x00e2efa7, size: 129 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(27) /* metro dependency 27 */).Appearance;
const env0_1 = (require(1313) /* metro dependency 1313: ThemeConstants */).SystemTheme;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/getSystemTheme.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/getSystemTheme.native.tsx');
exports.default = function() {
var value2 = Appearance.getColorScheme();
if (value2 === 'light') {
@@ -17,3 +19,4 @@ function _fun15370(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun15370, 1347, [27, 1313, 2]) /* metro module 1347, dependencies: [27, 1313, 2] */;
@@ -1,24 +1,27 @@
/* Metro module 12993; source: modules/themes/native/updateSaturation.tsx; dependencies: [27, 477, 12994, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun99112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13183:6, offset: 0x021bb6f6, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/native/updateSaturation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/native/updateSaturation.tsx');
exports.updateSaturation = updateSaturation;
}
function updateSaturation(a0) { // fn#99113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13183:215, offset: 0x021bb772, size: 97 bytes, params: 2, frame: 14
var r0;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(12994) /* metro dependency 12994: NativeThemeModule */;
value = value.updateSaturation(a0);
r0 = value;
} else {
r0 = NativeModules.DCDTheme.updateSaturation(a0);
function updateSaturation(a0) { // fn#99113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13183:215, offset: 0x021bb772, size: 97 bytes, params: 2, frame: 14
var r0;
var value;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(12994) /* metro dependency 12994: NativeThemeModule */;
value = value.updateSaturation(a0);
r0 = value;
} else {
r0 = NativeModules.DCDTheme.updateSaturation(a0);
}
return r0;
}
return r0;
}
global.__d(_fun99112, 12993, [27, 477, 12994, 2]) /* metro module 12993, dependencies: [27, 477, 12994, 2] */;
+18 -15
View File
@@ -1,24 +1,27 @@
/* Metro module 15312; source: modules/themes/native/updateTheme.tsx; dependencies: [27, 477, 12994, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun117057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15509:6, offset: 0x024a1bcd, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/native/updateTheme.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/native/updateTheme.tsx');
exports.updateTheme = updateTheme_117058;
}
function updateTheme_117058(a0) { // fn#117058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15509:205, offset: 0x024a1c49, size: 97 bytes, params: 2, frame: 14
var r0;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(12994) /* metro dependency 12994: NativeThemeModule */;
value = value.updateTheme(a0);
r0 = value;
} else {
r0 = NativeModules.DCDTheme.updateTheme(a0);
function updateTheme_117058(a0) { // fn#117058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15509:205, offset: 0x024a1c49, size: 97 bytes, params: 2, frame: 14
var r0;
var value;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(12994) /* metro dependency 12994: NativeThemeModule */;
value = value.updateTheme(a0);
r0 = value;
} else {
r0 = NativeModules.DCDTheme.updateTheme(a0);
}
return r0;
}
return r0;
}
global.__d(_fun117057, 15312, [27, 477, 12994, 2]) /* metro module 15312, dependencies: [27, 477, 12994, 2] */;
@@ -1,24 +1,27 @@
/* Metro module 15311; source: modules/themes/native/updateVisualRefresh.tsx; dependencies: [27, 477, 12994, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun117055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15508:6, offset: 0x024a1af0, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/native/updateVisualRefresh.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/native/updateVisualRefresh.tsx');
exports.updateVisualRefresh = updateVisualRefresh;
}
function updateVisualRefresh(a0) { // fn#117056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15508:221, offset: 0x024a1b6c, size: 97 bytes, params: 2, frame: 14
var r0;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(12994) /* metro dependency 12994: NativeThemeModule */;
value = value.setVisualRefreshEnabled(a0);
r0 = value;
} else {
r0 = NativeModules.DCDTheme.setVisualRefreshEnabled(a0);
function updateVisualRefresh(a0) { // fn#117056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15508:221, offset: 0x024a1b6c, size: 97 bytes, params: 2, frame: 14
var r0;
var value;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(12994) /* metro dependency 12994: NativeThemeModule */;
value = value.setVisualRefreshEnabled(a0);
r0 = value;
} else {
r0 = NativeModules.DCDTheme.setVisualRefreshEnabled(a0);
}
return r0;
}
return r0;
}
global.__d(_fun117055, 15311, [27, 477, 12994, 2]) /* metro module 15311, dependencies: [27, 477, 12994, 2] */;
@@ -1,49 +1,63 @@
/* Metro module 15310; source: modules/themes/native/useNativeThemeUpdater.tsx; dependencies: [31, 1310, 1357, 15311, 15312, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import MobileVisualRefreshExperiment from '../experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UpdateVisualRefreshModule from './updateVisualRefresh.tsx'; /* Metro dependency 15311 */
import * as UpdateThemeModule from './updateTheme.tsx'; /* Metro dependency 15312 */
function _fun117049(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:6, offset: 0x024a1908, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/native/useNativeThemeUpdater.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/native/useNativeThemeUpdater.tsx');
exports.default = useNativeThemeUpdater;
}
function useNativeThemeUpdater() { // fn#117050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:207, offset: 0x024a1991, size: 122 bytes, params: 1, frame: 15
const value2 = (MobileVisualRefreshExperiment)('useNativeThemeUpdater');
const env0_1 = ReactModule.useRef(ThemeStore.theme);
ReactModule.useLayoutEffect(_fun117051, [value2]);
ReactModule.useLayoutEffect(function() {
var closure = _fun117053;
var env0_0 = closure;
var moduleValue = require(dependencyMap[4]);
var themeStoreBinding = ThemeStore;
moduleValue.updateTheme(themeStoreBinding.theme);
themeStoreBinding.addChangeListener(closure);
return _fun117054;
}, []);
function _fun117051() { // fn#117051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:318, offset: 0x024a1a0b, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UpdateVisualRefreshModule).updateVisualRefresh(env0_0);
}
function useNativeThemeUpdater() { // fn#117050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:207, offset: 0x024a1991, size: 122 bytes, params: 1, frame: 15
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useNativeThemeUpdater');
const binding = env0_3;
const env0_1 = binding.useRef(ThemeStore.theme);
binding.useLayoutEffect(_fun117051, [value2]);
binding.useLayoutEffect(function() {
var closure = _fun117053;
var env0_0 = closure;
require(dependencyMap[4]).updateTheme(ThemeStore.theme);
ThemeStore.addChangeListener(closure);
return _fun117054;
}, []);
}
function _fun117052() { // fn#117052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:380, offset: 0x024a1a38, size: 79 bytes, params: 1, frame: 14
const handleThemeUpdate2 = handleThemeUpdate;
const updateTheme = UpdateThemeModule.updateTheme;
const themeStoreBinding = ThemeStore;
Reflect.apply(updateTheme, UpdateThemeModule, [themeStoreBinding.theme]);
themeStoreBinding.addChangeListener(handleThemeUpdate2);
return function() {
ThemeStore.removeChangeListener(handleThemeUpdate);
};
function handleThemeUpdate() { // fn#117053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:385, offset: 0x024a1a87, size: 76 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const theme = ThemeStore.theme;
if (theme !== env1_1.current) {
env1_1.current = theme;
(require(15312) /* metro dependency 15312: updateTheme */).updateTheme(theme);
}
}
function _fun117051() { // fn#117051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:318, offset: 0x024a1a0b, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(15311) /* metro dependency 15311: updateVisualRefresh */).updateVisualRefresh(env0_0);
}
function _fun117054() { // fn#117054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:555, offset: 0x024a1ad3, size: 29 bytes, params: 1, frame: 11
const themeStoreBinding = ThemeStore;
themeStoreBinding.removeChangeListener(handleThemeUpdate);
}
function _fun117052() { // fn#117052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:380, offset: 0x024a1a38, size: 79 bytes, params: 1, frame: 14
const closure = handleThemeUpdate;
const updateThemeModule = require(15312) /* metro dependency 15312: updateTheme */;
updateThemeModule.updateTheme(ThemeStore.theme);
ThemeStore.addChangeListener(closure);
return function() {
ThemeStore.removeChangeListener(handleThemeUpdate);
};
}
}
function handleThemeUpdate() { // fn#117053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:385, offset: 0x024a1a87, size: 76 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const theme = ThemeStore.theme;
if (theme !== env1_1.current) {
env1_1.current = theme;
(require(15312) /* metro dependency 15312: updateTheme */).updateTheme(theme);
}
}
global.__d(_fun117049, 15310, [31, 1310, 1357, 15311, 15312,
2]) /* metro module 15310, dependencies: [31, 1310, 1357, 15311, 15312, 2] */;
+76 -75
View File
@@ -1,38 +1,59 @@
/* Metro module 1353; source: modules/themes/resolveTheme.native.tsx; dependencies: [1354, 1311, 1312, 1348, 1313, 1355, 1314, 1357, 2] */
import SelectivelySyncedUserSettingsStore from '../user_settings/SelectivelySyncedUserSettingsStore.tsx'; /* Metro dependency 1311 */
import UnsyncedUserSettingsStore from '../user_settings/UnsyncedUserSettingsStore.tsx'; /* Metro dependency 1312 */
import UserSettingsProtoStore from '../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import CustomThemeMobileStore from '../client_themes/native/CustomThemeMobileStore.tsx'; /* Metro dependency 1354 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ThemeConstantsModule from '../user_settings/ThemeConstants.tsx'; /* Metro dependency 1313 */
import * as Preloaded_user_settingsModule from '../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */
import * as AuthenticationUtilsModule from '../../utils/AuthenticationUtils.tsx'; /* Metro dependency 1355 */
function _fun15539(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1480:6, offset: 0x00e35a59, size: 212 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const customThemeMobileStore = importDefault(1354) /* metro dependency 1354: CustomThemeMobileStore */;
const selectivelySyncedUserSettingsStore = importDefault(1311) /* metro dependency 1311: SelectivelySyncedUserSettingsStore */;
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const themeConstantsModule = require(1313) /* metro dependency 1313: ThemeConstants */;
const env0_6 = themeConstantsModule.PROTO_THEME_MAP_MOBILE;
const env0_7 = themeConstantsModule.PROTO_THEME_MAP_MOBILE_REFRESH;
const env0_8 = themeConstantsModule.SystemTheme;
const env0_9 = themeConstantsModule.SystemThemeState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/resolveTheme.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/resolveTheme.native.tsx');
exports.default = resolveTheme;
}
function resolveTheme(a0, a1) { // fn#15540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1480:327, offset: 0x00e35b2d, size: 341 bytes, params: 3, frame: 18
var theme;
var r5;
var r4;
var appearanceSettings;
var appearance;
const Theme = (require(1314) /* metro dependency 1314: preloaded_user_settings */).Theme;
var moduleValue2;
const previewTheme = CustomThemeMobileStore.getPreviewTheme();
const value3 = undefined;
if (value3 !== previewTheme) {
return previewTheme.baseTheme;
}
const useSystemTheme = UnsyncedUserSettingsStore.useSystemTheme;
const authenticationUtilsModule = require(1355) /* metro dependency 1355: AuthenticationUtils */;
if (authenticationUtilsModule.isAuthenticated()) {
if (useSystemTheme !== SystemThemeState.ON) {
function resolveTheme(a0, a1) { // fn#15540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1480:327, offset: 0x00e35b2d, size: 341 bytes, params: 3, frame: 18
var theme;
var r5;
var r4;
var appearanceSettings;
var appearance;
const Theme = (Preloaded_user_settingsModule).Theme;
var moduleValue2;
const previewTheme = CustomThemeMobileStore.getPreviewTheme();
const value3 = undefined;
if (value3 !== previewTheme) {
return previewTheme.baseTheme;
}
const useSystemTheme = UnsyncedUserSettingsStore.useSystemTheme;
if (AuthenticationUtilsModule.isAuthenticated()) {
if (useSystemTheme !== SystemThemeState.ON) {
appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings();
theme = appearanceSettings == null ? value3 : appearanceSettings.theme;
if (theme != null) {
return theme;
}
appearance = UserSettingsProtoStore.settings.appearance;
theme = appearance == null ? value3 : appearance.theme;
r5 = theme ?? Theme.UNSET;
if (r5 !== Theme.UNSET) {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
} else if (a0 !== SystemTheme.NO_PREFERENCE) {
r4 = a1[a0];
} else {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
}
return r4;
}
if (a0 !== SystemTheme.NO_PREFERENCE) {
return a1[a0];
}
appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings();
theme = appearanceSettings == null ? value3 : appearanceSettings.theme;
if (theme != null) {
@@ -52,54 +73,34 @@ function resolveTheme(a0, a1) { // fn#15540, source: /ci/build/discord/discord/d
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
}
return r4;
}
if (a0 !== SystemTheme.NO_PREFERENCE) {
return a1[a0];
}
appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings();
theme = appearanceSettings == null ? value3 : appearanceSettings.theme;
if (theme != null) {
return theme;
}
appearance = UserSettingsProtoStore.settings.appearance;
theme = appearance == null ? value3 : appearance.theme;
r5 = theme ?? Theme.UNSET;
if (r5 !== Theme.UNSET) {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
} else if (a0 !== SystemTheme.NO_PREFERENCE) {
r4 = a1[a0];
} else {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
}
} else {
if (a0 !== SystemTheme.NO_PREFERENCE) {
return a1[a0];
}
appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings();
theme = appearanceSettings == null ? value3 : appearanceSettings.theme;
if (theme != null) {
return theme;
}
appearance = UserSettingsProtoStore.settings.appearance;
theme = appearance == null ? value3 : appearance.theme;
r5 = theme ?? Theme.UNSET;
if (r5 !== Theme.UNSET) {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
} else if (a0 !== SystemTheme.NO_PREFERENCE) {
r4 = a1[a0];
} else {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
if (a0 !== SystemTheme.NO_PREFERENCE) {
return a1[a0];
}
appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings();
theme = appearanceSettings == null ? value3 : appearanceSettings.theme;
if (theme != null) {
return theme;
}
appearance = UserSettingsProtoStore.settings.appearance;
theme = appearance == null ? value3 : appearance.theme;
r5 = theme ?? Theme.UNSET;
if (r5 !== Theme.UNSET) {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
} else if (a0 !== SystemTheme.NO_PREFERENCE) {
r4 = a1[a0];
} else {
moduleValue2 = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
r4 = moduleValue2.isMobileVisualRefreshEnabled('resolveTheme') ? PROTO_THEME_MAP_MOBILE_REFRESH : PROTO_THEME_MAP_MOBILE;
r4 = r4[r5];
}
}
return r4;
}
return r4;
}
global.__d(_fun15539, 1353, [1354, 1311, 1312, 1348, 1313, 1355, 1314, 1357,
2]) /* metro module 1353, dependencies: [1354, 1311, 1312, 1348, 1313, 1355, 1314, 1357, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 1361; source: modules/themes/updateBackgroundColor.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun15594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1488:6, offset: 0x00e36d75, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/updateBackgroundColor.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/themes/updateBackgroundColor.native.tsx');
exports.default = function() {
};
}
global.__d(_fun15594, 1361, [2]) /* metro module 1361, dependencies: [2] */;