Files
discord-decomp/sources/stores/DefaultRouteStore.tsx
T
2026-07-27 16:20:00 +03:00

96 lines
4.8 KiB
TypeScript

/* Metro module 3973; source: stores/DefaultRouteStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 587, 694, 2] */
function _fun32588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:6, offset: 0x01019ddc, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Routes;
object = {'lastViewedPath': null, 'lastViewedNonVoicePath': null};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun32592(PersistedStore);
value.displayName = 'DefaultRouteStore';
value.persistKey = 'DefaultRouteStore';
value.migrations = [_fun32599];
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {SAVE_LAST_ROUTE: SAVE_LAST_ROUTE,
SAVE_LAST_NON_VOICE_ROUTE: SAVE_LAST_NON_VOICE_ROUTE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/DefaultRouteStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_32589() { // fn#32589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:165, offset: 0x01019f3a, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_32589_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun32592(a0) { // fn#32592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:445, offset: 0x01019f98, size: 162 bytes, params: 2, frame: 16
const closure = DefaultRouteStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_32594}, {key: 'defaultRoute', get: get_32595},
{key: 'lastNonVoiceRoute', get: get_32596}, {key: 'fallbackRoute', get: function() {
return Routes.ME;
}}, {key: 'getState', value: value_32598}]);
}
function _fun32599() { // fn#32599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1173, offset: 0x0101a0ad, size: 85 bytes, params: 1, frame: 17
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value = Storage.get('LAST_VIEWED_PATH', null);
Storage.remove('LAST_VIEWED_PATH');
return {lastViewedPath: value};
}
function SAVE_LAST_ROUTE({path}) { // fn#32600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1303, offset: 0x0101a102, size: 26 bytes, params: 2, frame: 2
env0_9.lastViewedPath = path;
return true;
}
function SAVE_LAST_NON_VOICE_ROUTE({path}) { // fn#32601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:1394, offset: 0x0101a11c, size: 26 bytes, params: 2, frame: 2
env0_9.lastViewedNonVoicePath = path;
return true;
}
function value_32594() { // fn#32594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:760, offset: 0x0101a03a, size: 38 bytes, params: 1, frame: 3
let value = a0;
if ((value !== undefined ? value : env1_8) == null) {
value = environment.__proto__;
}
value = environment.__proto__;
}
function get_32595() { // fn#32595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:814, offset: 0x0101a060, size: 31 bytes, params: 1, frame: 3
return env1_9.lastViewedPath ?? Routes.ME;
}
function get_32596() { // fn#32596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4122:903, offset: 0x0101a07f, size: 31 bytes, params: 1, frame: 3
return env1_9.lastViewedNonVoicePath ?? Routes.ME;
}