Files
discord-decomp/sources/modules/applications/utils/ApplicationFlagUtils.tsx
T
2026-07-27 16:20:00 +03:00

55 lines
2.4 KiB
TypeScript

/* Metro module 7504; source: modules/applications/utils/ApplicationFlagUtils.tsx; dependencies: [4235, 483, 2] */
function _fun60510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:6, offset: 0x01704c7a, size: 130 bytes, params: 8, frame: 18
const closure = getApplicationFlags;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/utils/ApplicationFlagUtils.tsx');
exports.getApplicationFlags = closure;
exports.hasApplicationFlag = hasApplicationFlag;
}
function getApplicationFlags(a0) { // fn#60511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:106, offset: 0x01704cfc, size: 242 bytes, params: 2, frame: 15
var r4;
var r3;
var r2;
var r0;
var value;
var deserialize;
if (a0 == null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.deserialize(0);
r0 = value;
} else {
value = a0 != null;
if (value) {
r3 = a0 instanceof ApplicationRecord || 'flags' in a0 && typeof a0.flags === 'bigint';
if (!r3) {
r4 = 'flags' in a0 && a0.flags != null;
r4 = r4 && typeof a0.flags === 'object';
r4 = r4 && 'parts' in a0.flags;
r3 = r4;
}
r2 = r3;
} else {
r2 = value;
}
if (r2) {
r0 = a0.flags;
} else {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
deserialize = value.deserialize;
r0 = a0.flags_new ?? a0.flags ?? 0;
value = Reflect.apply(deserialize, value, [r0]);
r0 = value;
}
}
return r0;
}
function hasApplicationFlag(a0, a1) { // fn#60512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:588, offset: 0x01704dee, size: 53 bytes, params: 3, frame: 14
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
return bigFlagUtilsModule.has(getApplicationFlags(a0), a1);
}