Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,267 @@
|
||||
/* Metro module 15687; source: modules/custom_status/CustomStatusManager.tsx; dependencies: [7, 6, 15, 17, 18, 6876, 661, 4041, 3829, 10917, 1362, 1345, 10916, 4860, 2] */
|
||||
function _fun120337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:6, offset: 0x02528634, size: 398 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = constantsModule.AnalyticsObjects;
|
||||
const env0_10 = constantsModule.StatusTypes;
|
||||
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
|
||||
let timeout = new Timeout();
|
||||
timeout = new Timeout();
|
||||
timeout = new Timeout();
|
||||
timeout = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
timeout = _fun120341(timeout);
|
||||
timeout = new timeout();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/custom_status/CustomStatusManager.tsx');
|
||||
exports.default = timeout;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120338() { // fn#120338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:205, offset: 0x025287c2, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_120338_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun120341(a0) { // fn#120341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:477, offset: 0x02528824, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = CustomStatusManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function CustomStatusManager(a0) { // fn#120342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:489, offset: 0x0252884e, size: 255 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, CustomStatusManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(CustomStatusManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_120338()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_120343,
|
||||
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_120344};
|
||||
value.handlePostConnectionOpen = handlePostConnectionOpen_120345;
|
||||
value.handleUserSettingsProtoUpdate = handleUserSettingsProtoUpdate;
|
||||
value.handleCommonUpdates = handleCommonUpdates;
|
||||
value.manageExpiringCustomStatus = manageExpiringCustomStatus;
|
||||
value.manageExpiringStatus = manageExpiringStatus;
|
||||
value.lazilyMigrateStatusCreatedAt = lazilyMigrateStatusCreatedAt;
|
||||
value.manageExpiringFocusMode = manageExpiringFocusMode;
|
||||
return value;
|
||||
}
|
||||
|
||||
function CustomStatusManagerUSER_SETTINGS_PROTO_UPDATE() { // fn#120344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:824, owner: CustomStatusManager.USER_SETTINGS_PROTO_UPDATE, offset: 0x0252894d, size: 19 bytes, params: 1, frame: 9
|
||||
return env0_0.handleUserSettingsProtoUpdate();
|
||||
}
|
||||
|
||||
function CustomStatusManagerHandlePostConnectionOpen() { // fn#120345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:890, owner: CustomStatusManager.handlePostConnectionOpen, offset: 0x02528960, size: 21 bytes, params: 1, frame: 9
|
||||
env0_0.handleCommonUpdates();
|
||||
}
|
||||
|
||||
function handleCommonUpdates() { // fn#120347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:1004, owner: CustomStatusManager.handleCommonUpdates, offset: 0x02528975, size: 51 bytes, params: 1, frame: 9
|
||||
const binding = env0_0;
|
||||
binding.manageExpiringCustomStatus();
|
||||
binding.manageExpiringStatus();
|
||||
binding.lazilyMigrateStatusCreatedAt();
|
||||
binding.manageExpiringFocusMode();
|
||||
}
|
||||
|
||||
function manageExpiringCustomStatus() { // fn#120348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:1156, owner: CustomStatusManager.manageExpiringCustomStatus, offset: 0x025289a8, size: 302 bytes, params: 1, frame: 17
|
||||
var Date;
|
||||
var value3;
|
||||
var prototype;
|
||||
var value4;
|
||||
var date;
|
||||
var time;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
let CustomStatusSetting = (require(3829) /* metro dependency 3829: UserSettings */).CustomStatusSetting;
|
||||
const setting = CustomStatusSetting.getSetting();
|
||||
if (setting == null) {
|
||||
env2_13.stop();
|
||||
} else if (setting.expiresAtMs == null) {
|
||||
if (env2_13 != null) {
|
||||
env2_13.stop();
|
||||
}
|
||||
} else if (setting.expiresAtMs !== '0') {
|
||||
Date = global.Date;
|
||||
value3 = global.Number(setting.expiresAtMs);
|
||||
prototype = Date.prototype;
|
||||
value4 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
time = (date instanceof Object ? date : value4).getTime();
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value7 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value8 = date instanceof Object ? date : value7;
|
||||
value9 = time - value8.getTime();
|
||||
if (value9 > 0) {
|
||||
env2_13.start(value9, function() {
|
||||
var CustomStatusSetting = require(dependencyMap[8]).CustomStatusSetting;
|
||||
CustomStatusSetting.updateSetting(undefined);
|
||||
}, true);
|
||||
} else {
|
||||
CustomStatusSetting.updateSetting(undefined);
|
||||
env2_13.stop();
|
||||
}
|
||||
} else if (env2_13 != null) {
|
||||
env2_13.stop();
|
||||
}
|
||||
}
|
||||
|
||||
function manageExpiringStatus() { // fn#120350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:1531, owner: CustomStatusManager.manageExpiringStatus, offset: 0x02528b02, size: 325 bytes, params: 1, frame: 18
|
||||
var Date;
|
||||
var value4;
|
||||
var prototype;
|
||||
var value5;
|
||||
var date;
|
||||
var time;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
const StatusExpiresAtSetting = (require(3829) /* metro dependency 3829: UserSettings */).StatusExpiresAtSetting;
|
||||
const setting = StatusExpiresAtSetting.getSetting();
|
||||
if (setting == null) {
|
||||
if (env2_11 != null) {
|
||||
env2_11.stop();
|
||||
}
|
||||
} else if (setting === '0') {
|
||||
if (env2_11 != null) {
|
||||
env2_11.stop();
|
||||
}
|
||||
} else if (SelfPresenceStore.getStatus() !== StatusTypes.ONLINE) {
|
||||
Date = global.Date;
|
||||
value4 = global.Number(setting);
|
||||
prototype = Date.prototype;
|
||||
value5 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
time = (date instanceof Object ? date : value5).getTime();
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value8 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value9 = date instanceof Object ? date : value8;
|
||||
value10 = time - value9.getTime();
|
||||
if (value10 > 0) {
|
||||
env2_11.start(value10, function() {
|
||||
importDefault(dependencyMap[9])({nextStatus: StatusTypes.ONLINE,
|
||||
analyticsContext: {location: {object: AnalyticsObjects.CUSTOM_STATUS_MANAGER}}});
|
||||
}, true);
|
||||
} else {
|
||||
(importDefault(10917) /* metro dependency 10917: setUserStatus */)({nextStatus: StatusTypes.ONLINE,
|
||||
analyticsContext: {location: {object: AnalyticsObjects.CUSTOM_STATUS_MANAGER}}});
|
||||
env2_11.stop();
|
||||
}
|
||||
} else if (env2_11 != null) {
|
||||
env2_11.stop();
|
||||
}
|
||||
}
|
||||
|
||||
function lazilyMigrateStatusCreatedAt() { // fn#120352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:1966, owner: CustomStatusManager.lazilyMigrateStatusCreatedAt, offset: 0x02528c94, size: 160 bytes, params: 1, frame: 16
|
||||
var PreloadedUserSettingsActionCreators;
|
||||
const status = SelfPresenceStore.getStatus();
|
||||
const ONLINE = StatusTypes.ONLINE;
|
||||
if (status !== ONLINE && (require(3829) /* metro dependency 3829: UserSettings */).StatusCreatedAtSetting.getSetting() == null) {
|
||||
PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
|
||||
PreloadedUserSettingsActionCreators.updateAsync('status', _fun120353,
|
||||
(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay.INFREQUENT_USER_ACTION);
|
||||
}
|
||||
}
|
||||
|
||||
function manageExpiringFocusMode() { // fn#120354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:2272, owner: CustomStatusManager.manageExpiringFocusMode, offset: 0x02528d93, size: 260 bytes, params: 1, frame: 16
|
||||
var Date;
|
||||
var value3;
|
||||
var prototype;
|
||||
var value4;
|
||||
var date;
|
||||
var time;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
const FocusModeExpiresAtSetting = (require(3829) /* metro dependency 3829: UserSettings */).FocusModeExpiresAtSetting;
|
||||
const setting = FocusModeExpiresAtSetting.getSetting();
|
||||
if (setting == null) {
|
||||
if (env2_12 != null) {
|
||||
env2_12.stop();
|
||||
}
|
||||
} else if (setting !== '0') {
|
||||
Date = global.Date;
|
||||
value3 = global.Number(setting);
|
||||
prototype = Date.prototype;
|
||||
value4 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
time = (date instanceof Object ? date : value4).getTime();
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value7 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value8 = date instanceof Object ? date : value7;
|
||||
value9 = time - value8.getTime();
|
||||
if (value9 > 0) {
|
||||
env2_12.start(value9, _fun120355, true);
|
||||
} else {
|
||||
(require(10916) /* metro dependency 10916: FocusModeUtils */).setFocusMode(false);
|
||||
env2_12.stop();
|
||||
}
|
||||
} else if (env2_12 != null) {
|
||||
env2_12.stop();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120353(a0) { // fn#120353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:2115, offset: 0x02528d34, size: 95 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const UInt64Value = (require(1345) /* metro dependency 1345: wrappers */).UInt64Value;
|
||||
const create = UInt64Value.create;
|
||||
const object2 = {};
|
||||
const Date = global.Date;
|
||||
object2.value = '' + Date.now();
|
||||
a0.statusCreatedAtMs = Reflect.apply(create, UInt64Value, [object2]);
|
||||
}
|
||||
|
||||
function _fun120355() { // fn#120355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15895:2423, offset: 0x02528e97, size: 40 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
(require(10916) /* metro dependency 10916: FocusModeUtils */).setFocusMode(false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user