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

54 lines
2.6 KiB
TypeScript

/* Metro module 13965; source: modules/cache/CacheActionCreators.tsx; dependencies: [5, 1379, 4885, 694, 2] */
function _fun105998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14162:6, offset: 0x022ca29a, size: 176 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(1379) /* metro dependency 1379: ChannelStore */).ChannelLoader;
const cacheStore = importDefault(4885) /* metro dependency 4885: CacheStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/cache/CacheActionCreators.tsx');
exports.writeCaches = function() {
return _writeCaches.apply(this, arguments);
};
exports.clearCaches = clearCaches;
}
function _writeCaches() { // fn#105999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14162:140, offset: 0x022ca34a, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun106001).apply(this, arguments);
}
function clearCaches() { // fn#106003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14162:541, offset: 0x022ca440, size: 51 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'CLEAR_CACHES',
'reason': 'Requested by user', 'preventWritingCachesAgainThisSession': true, 'resetSocket': true});
}
async function _fun106001() { // fn#106001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14162:187, offset: 0x022ca390, size: 176 bytes, params: 1, frame: 17
var items2;
var Promise;
let value = a0;
if (true) {
var r6 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_4;
if (binding.canWriteCaches(r6)) {
binding = env2_3;
await binding.loadAllMissingChannels();
if (false) {
return undefined;
}
items2 = [];
binding = env2_0;
value = binding(env2_1[3]);
value.dispatch({type: 'WRITE_CACHES', promisesToWaitOn: items2});
Promise = global.Promise;
await Promise.all(items2);
value = undefined;
return undefined;
}
}
}