Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,102 @@
|
||||
/* Metro module 4278; source: utils/LibraryApplicationUtils.tsx; dependencies: [57, 1878, 4279, 661, 3829, 2] */
|
||||
function _fun36264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:6, offset: 0x01087244, size: 277 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = function(a0) {
|
||||
var value = a0;
|
||||
var value2 = null;
|
||||
return value2 == value ? value2 : value.type === LocalDispatchApplicationStates.INSTALLING || value.type === LocalDispatchApplicationStates.UPDATING ? value : value.type !== LocalDispatchApplicationStates.UNINSTALLING ? value2 : value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = constantsModule.LibraryApplicationFlags;
|
||||
const env0_6 = constantsModule.LocalDispatchApplicationStates;
|
||||
const env0_7 = constantsModule.StatusTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/LibraryApplicationUtils.tsx');
|
||||
exports.getComboId = function(a0, a1) {
|
||||
return '' + a0 + ':' + a1;
|
||||
};
|
||||
exports.convertComboId = convertComboId;
|
||||
exports.shouldShareApplicationActivity = shouldShareApplicationActivity;
|
||||
exports.calculateProgressPercentage = function(a0, a1) {
|
||||
var value = 100;
|
||||
return a1 === 0 ? value : a0 / a1 * value;
|
||||
};
|
||||
exports.shouldShowGameInLibrary = shouldShowGameInLibrary;
|
||||
exports.convertToTransitionState = closure;
|
||||
exports.getCombinedProgress = function(a0) {
|
||||
return a0.reduce(_fun36272, {'total': 0, 'progress': 0});
|
||||
};
|
||||
exports.isUserEntitledToLibraryApplication = isUserEntitledToLibraryApplication;
|
||||
}
|
||||
|
||||
function convertComboId(a0) { // fn#36267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:488, offset: 0x010873ad, size: 61 bytes, params: 2, frame: 13
|
||||
let value = a0.split(':');
|
||||
value = env0_2(value, 2);
|
||||
return {applicationId: value[0], branchId: value[1]};
|
||||
}
|
||||
|
||||
function shouldShareApplicationActivity(a0, a1) { // fn#36268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:618, offset: 0x010873ea, size: 147 bytes, params: 3, frame: 14
|
||||
var activeLibraryApplication;
|
||||
const ShowCurrentGame = (require(3829) /* metro dependency 3829: UserSettings */).ShowCurrentGame;
|
||||
const getSetting = ShowCurrentGame.getSetting;
|
||||
if (Reflect.apply(getSetting, ShowCurrentGame, [])) {
|
||||
if ((require(3829) /* metro dependency 3829: UserSettings */).StatusSetting.getSetting() === StatusTypes.INVISIBLE) {
|
||||
return false;
|
||||
}
|
||||
activeLibraryApplication = a1.getActiveLibraryApplication(a0);
|
||||
return activeLibraryApplication == null || !activeLibraryApplication.hasFlag(LibraryApplicationFlags.PRIVATE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function shouldShowGameInLibrary(a0, a1, a2) { // fn#36270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:965, offset: 0x01087499, size: 74 bytes, params: 4, frame: 13
|
||||
var r1;
|
||||
var r0;
|
||||
var enabled;
|
||||
const value = a1 != null;
|
||||
if (value) {
|
||||
enabled = a2.enabled;
|
||||
r1 = enabled ? !a1.hasFlag(LibraryApplicationFlags.PRIVATE) : !enabled;
|
||||
r1 = r1 && !a1.isHidden();
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getCombinedProgress(a0) { // fn#36271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1149, offset: 0x010874e3, size: 38 bytes, params: 2, frame: 13
|
||||
return a0.reduce(function(a0, a1) {
|
||||
var r0;
|
||||
var property;
|
||||
var object;
|
||||
var value = a0;
|
||||
var value3 = convertToTransitionState(a1);
|
||||
if (value3 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
property = a1.type;
|
||||
if (property === LocalDispatchApplicationStates.UP_TO_DATE) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {};
|
||||
property = value.total;
|
||||
object.total = property + global.Number(value3.total);
|
||||
property = value.progress;
|
||||
object.progress = property + global.Number(value3.progress);
|
||||
r0 = object;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}, {'total': 0, 'progress': 0});
|
||||
}
|
||||
|
||||
function isUserEntitledToLibraryApplication(a0) { // fn#36273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1413, offset: 0x01087585, size: 58 bytes, params: 2, frame: 15
|
||||
const isDiscordApplication = a0.isDiscordApplication();
|
||||
return isDiscordApplication ? a0.isEntitled(UserStore.getCurrentUser(), SKUStore) : !!isDiscordApplication;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user