Files
discord-decomp/sources/modules/client_themes/SavedCustomThemeActionCreators.tsx
2026-07-28 01:06:53 +03:00

44 lines
2.9 KiB
TypeScript

/* Metro module 13727; source: modules/client_themes/SavedCustomThemeActionCreators.tsx; dependencies: [4046, 661, 694, 507, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import SavedCustomThemeStore from './SavedCustomThemeStore.tsx'; /* Metro dependency 4046 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun104877(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13924:6, offset: 0x022a312f, size: 140 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/client_themes/SavedCustomThemeActionCreators.tsx');
exports.fetchUserCustomThemes = fetchUserCustomThemes;
function fetchUserCustomThemes() { // fn#104878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13924:240, offset: 0x022a31bb, size: 165 bytes, params: 1, frame: 16
var value;
const savedCustomThemeStoreBinding = SavedCustomThemeStore;
if (!savedCustomThemeStoreBinding.isFetching()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SAVED_CUSTOM_THEMES_FETCH_START'});
value = (require(507) /* metro dependency 507: HTTPUtils */).HTTP.get({'url': null, 'oldFormErrors': true,
'rejectWithError': true, url: Endpoints.USERS_ME_CUSTOM_THEMES});
value = value.then(_fun104879);
value.catch(_fun104880);
}
function _fun104879({body}) { // fn#104879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13924:440, offset: 0x022a3260, size: 89 bytes, params: 2, frame: 16
let value = environment.__proto__;
value = undefined;
const defaultImport = Dispatcher;
defaultImport.dispatch({type: 'SAVED_CUSTOM_THEMES_FETCH_SUCCESS',
themes: (body == null ? value : body.custom_themes) ?? []});
return value;
}
function _fun104880(a0) { // fn#104880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13924:585, offset: 0x022a32b9, size: 56 bytes, params: 2, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'SAVED_CUSTOM_THEMES_FETCH_FAILURE',
error: a0});
}
}
}
global.__d(_fun104877, 13727, [4046, 661, 694, 507,
2]) /* metro module 13727, dependencies: [4046, 661, 694, 507, 2] */;