122 lines
6.2 KiB
TypeScript
122 lines
6.2 KiB
TypeScript
/* Metro module 9457; source: modules/hub/HubJoinManager.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 661, 6947, 694, 4561, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import LifecycleManager from '../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun73558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:6, offset: 0x01d716ad, size: 268 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = LifecycleManager;
|
|
value = _fun73562(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/hub/HubJoinManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_73559() { // fn#73559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:182, offset: 0x01d717b9, 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_73559_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun73562(a0) { // fn#73562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:385, offset: 0x01d7181b, size: 97 bytes, params: 2, frame: 16
|
|
const HubJoinManager2 = HubJoinManager;
|
|
Inherits(HubJoinManager2, a0);
|
|
return CreateClass(HubJoinManager2, [{key: '_initialize', value: value_73565}, {key: '_terminate', value: value_73566}]);
|
|
function HubJoinManager(a0) { // fn#73563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:397, offset: 0x01d7187c, size: 145 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_3;
|
|
binding(this, HubJoinManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(HubJoinManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_73559()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.handleGuildCreate = handleGuildCreate_73564;
|
|
return value;
|
|
function HubJoinManagerHandleGuildCreate({guild}) { // fn#73564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:645, owner: HubJoinManager.handleGuildCreate, offset: 0x01d7190d, size: 152 bytes, params: 2, frame: 16
|
|
var r3;
|
|
var r7;
|
|
var features;
|
|
let value = environment.__proto__.__proto__;
|
|
const guild2 = GuildStore.getGuild(guild.id);
|
|
const value3 = guild2 != null;
|
|
if (value3) {
|
|
features = guild2.features;
|
|
r3 = features != null;
|
|
r7 = features;
|
|
} else {
|
|
r3 = value3;
|
|
r7 = undefined;
|
|
}
|
|
r3 = r3 && r7.has(GuildFeatures.HUB);
|
|
if (r3) {
|
|
if (env0_0.onClose != null) {
|
|
env0_0.onClose();
|
|
}
|
|
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
|
|
value.transitionToGuild(guild2.id);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function value_73565(a0) { // fn#73565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:861, offset: 0x01d719a5, size: 61 bytes, params: 2, frame: 14
|
|
this.onClose = a0;
|
|
let value = environment.__proto__;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.subscribe('GUILD_CREATE', this.handleGuildCreate);
|
|
}
|
|
|
|
function value_73566() { // fn#73566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9643:971, offset: 0x01d719e2, size: 52 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.unsubscribe('GUILD_CREATE', this.handleGuildCreate);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun73558, 9457, [6, 7, 15, 17, 18, 1867, 661, 6947, 694, 4561,
|
|
2]) /* metro module 9457, dependencies: [6, 7, 15, 17, 18, 1867, 661, 6947, 694, 4561, 2] */;
|