Files
discord-decomp/sources/modules/client_themes/SavedCustomThemeActionCreators.tsx
T
2026-07-27 16:20:00 +03:00

38 lines
2.4 KiB
TypeScript

/* Metro module 13727; source: modules/client_themes/SavedCustomThemeActionCreators.tsx; dependencies: [4046, 661, 694, 507, 2] */
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});
const savedCustomThemeStore = importDefault(4046) /* metro dependency 4046: SavedCustomThemeStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).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;
if (!SavedCustomThemeStore.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 = importDefault(694) /* metro dependency 694: 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__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SAVED_CUSTOM_THEMES_FETCH_FAILURE',
error: a0});
}