199 lines
7.2 KiB
TypeScript
199 lines
7.2 KiB
TypeScript
/* Metro module 9472; source: modules/activities/handleUsePrimaryEntryPointAppCommand.tsx; dependencies: [5, 1379, 1878, 9473, 8110, 8091, 9475, 7860, 2] */
|
|
function _fun73655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:6, offset: 0x01d74249, size: 179 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/handleUsePrimaryEntryPointAppCommand.tsx');
|
|
exports.default = function() {
|
|
return _handleUsePrimaryEntryPointAppCommand.apply(this, arguments);
|
|
};
|
|
}
|
|
|
|
function _handleUsePrimaryEntryPointAppCommand() { // fn#73656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:126, offset: 0x01d742fc, size: 50 bytes, params: 1, frame: 14
|
|
return env0_4(_fun73658).apply(this, arguments);
|
|
}
|
|
|
|
function _handleUsePrimaryEntryPointAppCommandInternal() { // fn#73661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:681, offset: 0x01d74442, size: 50 bytes, params: 1, frame: 14
|
|
return env0_4(_fun73663).apply(this, arguments);
|
|
}
|
|
|
|
function* _fun73658(a0) { // fn#73658, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:223, offset: 0x01d74339, size: 188 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value3;
|
|
var channelId;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var binding3;
|
|
var value7;
|
|
var shouldOpenActivityInPopoutWindow;
|
|
var shouldOpenActivityInPopoutWindow2;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const env0_0 = a0;
|
|
var env0_1;
|
|
let targetApplicationId = a0.targetApplicationId;
|
|
if (targetApplicationId == null) {
|
|
return false;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
binding2 = env2_3;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
property = binding2[3];
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
value3 = binding(property);
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
targetApplicationId = a0.targetApplicationId;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
channelId = a0.channelId;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
value4 = value3(targetApplicationId, channelId);
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
yield value4;
|
|
try {
|
|
value5 = undefined;
|
|
value6 = false;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
if (value6) {
|
|
return value5;
|
|
}
|
|
try {
|
|
env0_1 = value5;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
binding3 = env2_3;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
property = binding3[4];
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
value7 = binding(property);
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
shouldOpenActivityInPopoutWindow = value7.shouldOpenActivityInPopoutWindow;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
try {
|
|
shouldOpenActivityInPopoutWindow2 = Reflect.apply(shouldOpenActivityInPopoutWindow, value7, []);
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
return env2_0(env2_3[4]).wrapPreemptiveActivityPopout(shouldOpenActivityInPopoutWindow2, _fun73659);
|
|
}
|
|
|
|
async function _fun73663({targetApplication, locationObject, channelId, analyticsLocations, componentId, commandOrigin, sectionName, source, onExecutedCallback, referrerId, customId, inviterUserId, onConfirmActivityLaunchChecksAlertOpen}) { // fn#73663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:794, offset: 0x01d74488, size: 372 bytes, params: 2, frame: 33
|
|
var r5;
|
|
var value7;
|
|
var binding2;
|
|
var value10;
|
|
var markActivityUsed;
|
|
var id;
|
|
var runPrimaryAppCommandOrJoinEmbeddedActivity;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
const value4 = binding(env2_3[5])();
|
|
const currentUser = env2_6.getCurrentUser();
|
|
const value6 = channelId != null;
|
|
if (value6) {
|
|
binding = env2_5;
|
|
value7 = binding.getChannel(channelId) != null;
|
|
if (value7) {
|
|
r5 = currentUser != null && targetApplication != null;
|
|
if (r5) {
|
|
binding = env2_2;
|
|
binding2 = env2_3;
|
|
value10 = binding(binding2[6]);
|
|
markActivityUsed = value10.markActivityUsed;
|
|
id = targetApplication.id;
|
|
Reflect.apply(markActivityUsed, value10, [id]);
|
|
binding = env2_0;
|
|
value = binding(binding2[7]);
|
|
runPrimaryAppCommandOrJoinEmbeddedActivity = value.runPrimaryAppCommandOrJoinEmbeddedActivity;
|
|
id = targetApplication.id;
|
|
await Reflect.apply(runPrimaryAppCommandOrJoinEmbeddedActivity, value, [{channelId: channelId,
|
|
applicationId: id,
|
|
isStart: true, embeddedActivitiesManager: value4, componentId: componentId,
|
|
commandOrigin: commandOrigin,
|
|
sectionName: sectionName, locationObject: locationObject, analyticsLocations: analyticsLocations,
|
|
source: source, onExecutedCallback: onExecutedCallback, referrerId: referrerId, customId: customId,
|
|
inviterUserId: inviterUserId,
|
|
onConfirmActivityLaunchChecksAlertOpen: onConfirmActivityLaunchChecksAlertOpen}]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value;
|
|
}
|
|
return r5;
|
|
}
|
|
return value7;
|
|
}
|
|
return value6;
|
|
}
|
|
|
|
function _fun73659() { // fn#73659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:452, offset: 0x01d743f5, size: 47 bytes, params: 1, frame: 12
|
|
const object2 = {};
|
|
copyDataProperties(object2, env0_0, object2);
|
|
object2['targetApplication'] = env0_1;
|
|
return handleUsePrimaryEntryPointAppCommandInternal(object2);
|
|
}
|
|
|
|
function handleUsePrimaryEntryPointAppCommandInternal() { // fn#73660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9658:456, offset: 0x01d74424, size: 30 bytes, params: 1, frame: 13
|
|
return env4_8.apply(this, arguments);
|
|
}
|
|
|