92 lines
2.5 KiB
TypeScript
92 lines
2.5 KiB
TypeScript
// Module ID: 13039
|
|
// Function ID: 13040
|
|
// Name: isActivityJoinableOnCurrentPlatform
|
|
// Dependencies: [1074, 1116, 1608, 7313, 2]
|
|
// Exports: default, getCurrentActivityGamePlatform, isActivityJoinable
|
|
|
|
// Module 13039 (isActivityJoinableOnCurrentPlatform)
|
|
import set from "set" /* 2 */;
|
|
import PlatformTypes from "PlatformTypes" /* 1116 */;
|
|
import hasFlagDefault from "hasFlag" /* 7313 */;
|
|
import ME from "ME" /* 1074 */;
|
|
|
|
({ ActivityFlags: c3, ActivityGamePlatforms: c4, ActivityTypes: c5 } = ME);
|
|
const result = set.fileFinishedImporting("modules/activities/utils/isActivityJoinableOnCurrentPlatform.tsx");
|
|
|
|
export default function isActivityJoinableOnCurrentPlatform(type) {
|
|
let tmp = null == type;
|
|
if (!tmp) {
|
|
tmp = !hasFlagDefault(type, constants.JOIN);
|
|
}
|
|
if (!tmp) {
|
|
tmp = type.type !== constants3.PLAYING;
|
|
}
|
|
if (!tmp) {
|
|
if (obj.isIOS()) {
|
|
let DESKTOP = constants2.IOS;
|
|
let tmp9 = constants2;
|
|
} else {
|
|
let tmp6Result = tmp6(1608);
|
|
if (tmp6Result.isMetaQuest()) {
|
|
DESKTOP = constants2.META_QUEST;
|
|
tmp9 = constants2;
|
|
} else {
|
|
tmp6Result = tmp6(1116);
|
|
if (tmp6Result.isAndroid()) {
|
|
DESKTOP = tmp8.ANDROID;
|
|
tmp9 = tmp8;
|
|
} else {
|
|
DESKTOP = tmp8.DESKTOP;
|
|
tmp9 = tmp8;
|
|
}
|
|
}
|
|
}
|
|
let platform;
|
|
if (type != null) {
|
|
platform = type.platform;
|
|
}
|
|
if ((null != platform ? type.platform : tmp9.DESKTOP) === DESKTOP) {
|
|
return true;
|
|
} else {
|
|
let supported_platforms;
|
|
if (type != null) {
|
|
supported_platforms = type.supported_platforms;
|
|
}
|
|
let hasItem = null != supported_platforms;
|
|
if (hasItem) {
|
|
hasItem = 0 !== supported_platforms.length;
|
|
}
|
|
if (hasItem) {
|
|
hasItem = supported_platforms.includes(DESKTOP);
|
|
}
|
|
return hasItem;
|
|
}
|
|
obj = PlatformTypes;
|
|
} else {
|
|
return false;
|
|
}
|
|
};
|
|
export const getCurrentActivityGamePlatform = function getCurrentActivityGamePlatform() {
|
|
if (obj.isIOS()) {
|
|
let META_QUEST = constants2.IOS;
|
|
} else {
|
|
let tmpResult = tmp(1608);
|
|
if (tmpResult.isMetaQuest()) {
|
|
META_QUEST = constants2.META_QUEST;
|
|
} else {
|
|
tmpResult = tmp(1116);
|
|
META_QUEST = tmpResult.isAndroid() ? tmp3.ANDROID : tmp3.DESKTOP;
|
|
}
|
|
}
|
|
return META_QUEST;
|
|
};
|
|
export const isActivityJoinable = function isActivityJoinable(type) {
|
|
let tmp = null == type;
|
|
if (!tmp) {
|
|
tmp = !hasFlagDefault(type, constants.JOIN);
|
|
}
|
|
if (!tmp) {
|
|
tmp = type.type !== constants3.PLAYING;
|
|
}
|
|
return !tmp;
|
|
};
|