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

114 lines
5.5 KiB
TypeScript

/* Metro module 13088; source: modules/game_relationships/GameRelationshipManager.tsx; dependencies: [6, 7, 15, 17, 18, 5242, 661, 6772, 694, 4561, 2] */
function _fun100007(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:6, offset: 0x021dbaa4, size: 264 bytes, params: 8, frame: 19
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 gameRelationshipStore = importDefault(5242) /* metro dependency 5242: GameRelationshipStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun100011(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_relationships/GameRelationshipManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_100008() { // fn#100008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:186, offset: 0x021dbbac, size: 98 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_100008_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun100011(a0) { // fn#100011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:389, offset: 0x021dbc0e, size: 122 bytes, params: 2, frame: 16
const closure = GameRelationshipManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_100015}, {key: '_terminate', value: value_100016},
{key: 'destroy', value: value_100017}]);
}
function GameRelationshipManager(a0) { // fn#100012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:401, offset: 0x021dbc88, size: 141 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, GameRelationshipManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(GameRelationshipManager);
binding = env1_4;
if (_isNativeReflectConstruct_100008()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handlePostConnectionOpen = handlePostConnectionOpen_100013;
return value;
}
function value_100015() { // fn#100015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:940, offset: 0x021dbdc8, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function value_100016() { // fn#100016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:1049, offset: 0x021dbdfc, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function GameRelationshipManagerHandlePostConnectionOpen() { // fn#100013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:683, owner: GameRelationshipManager.handlePostConnectionOpen, offset: 0x021dbd15, size: 128 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const gameRelationships = GameRelationshipStore.getGameRelationships();
const Set = global.Set;
const set = new Set();
gameRelationships.values().forEach(_fun100014);
value = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
const fetchApplications = value.fetchApplications;
const Array = global.Array;
Reflect.apply(fetchApplications, value, [Array.from(set)]);
}
function _fun100014(a0) { // fn#100014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13278:749, offset: 0x021dbd95, size: 51 bytes, params: 2, frame: 11
var binding;
const type = a0.type;
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
if (type === PENDING_INCOMING) {
binding = env0_0;
binding.add(a0.applicationId);
}
}