decord/alpha/source/modules/activities/utils/tryLaunchAsFrame.tsx

38 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-10-06 11:16:32 +00:00
// Module ID: 9028
// Function ID: 9029
2026-07-20 16:05:17 +00:00
// Name: tryLaunchAsFrame
2026-10-06 11:16:32 +00:00
// Dependencies: [5124, 8738, 9027, 9019, 2]
2026-07-20 16:05:17 +00:00
// Exports: tryLaunchAsFrame
2026-10-06 11:16:32 +00:00
// Module 9028 (tryLaunchAsFrame)
import FramesConstants from "FramesConstants" /* 8738 */;
import FramesActionCreatorsDefault from "FramesActionCreators" /* 9019 */;
import canLaunchContextlessFrame from "canLaunchContextlessFrame" /* 9027 */;
import ApplicationStore from "ApplicationStore" /* 5124 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const MAIN_SURFACE = FramesConstants.MAIN_SURFACE;
const result = size.fileFinishedImporting("modules/activities/utils/tryLaunchAsFrame.tsx");
2026-07-20 16:05:17 +00:00
export const tryLaunchAsFrame = function tryLaunchAsFrame(applicationId) {
2026-10-03 08:58:59 +00:00
let analyticsContext;
let customId;
let referrerId;
2026-07-20 16:05:17 +00:00
applicationId = applicationId.applicationId;
({ customId, referrerId, analyticsContext } = applicationId);
const application = ApplicationStore.getApplication(applicationId);
2026-07-20 16:05:17 +00:00
let tmp2 = null == application;
if (!tmp2) {
2026-10-03 08:58:59 +00:00
const obj = canLaunchContextlessFrame;
tmp2 = !obj.canLaunchContextlessFrame(application);
2026-07-20 16:05:17 +00:00
}
let flag = !tmp2;
2026-10-03 08:58:59 +00:00
if (flag) {
const obj3 = { applicationId, surface: MAIN_SURFACE, customId, referrerId, analyticsContext };
2026-10-03 08:58:59 +00:00
const obj2 = FramesActionCreatorsDefault;
obj2.launchFrame(obj3);
2026-07-20 16:05:17 +00:00
flag = true;
}
return flag;
};