/* Metro module 15837; source: modules/urgent_system_dm/UrgentSystemDMManagerBase.tsx; dependencies: [7, 6, 15, 17, 18, 1379, 1934, 1878, 15838, 661, 8061, 4860, 2] */ function _fun121766(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:6, offset: 0x02550c72, size: 329 bytes, params: 8, frame: 19 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(7) /* metro dependency 7 */; const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(15) /* metro dependency 15 */; const env0_5 = importDefault(17) /* metro dependency 17 */; const env0_6 = importDefault(18) /* metro dependency 18 */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_10 = (require(15838) /* metro dependency 15838: Constants */).SYSTEM_USER; const env0_11 = (require(661) /* metro dependency 661: Constants */).UserFlags; let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */; value = _fun121772(value); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/urgent_system_dm/UrgentSystemDMManagerBase.tsx'); exports.default = value; } function _isNativeReflectConstruct_121767() { // fn#121767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:220, offset: 0x02550dbb, 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_121767_isNativeReflectConstruct = function() { return !!result; })(); } function maybeShowUrgentMessageModal(a0) { // fn#121770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:422, offset: 0x02550e1d, size: 117 bytes, params: 2, frame: 14 const currentUser = UserStore.getCurrentUser(); if (currentUser != null) { var channelId = SelectedChannelStore.getChannelId(); if (currentUser.hasUrgentMessages()) { if (ChannelStore.getDMFromUserId(SYSTEM_USER) === channelId) { maybeClearUrgentMessage({channelId: channelId}); return undefined; } if (!env0_12) { a0(); } return undefined; } maybeClearUrgentMessage({channelId: channelId}); } } function maybeClearUrgentMessage({channelId}) { // fn#121771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:639, offset: 0x02550e92, size: 129 bytes, params: 2, frame: 15 var moduleValue; const currentUser = UserStore.getCurrentUser(); const getDMFromUserId = ChannelStore.getDMFromUserId; if (currentUser != null && currentUser.hasUrgentMessages() && channelId === Reflect.apply(getDMFromUserId, ChannelStore, [SYSTEM_USER])) { moduleValue = importAll(8061) /* metro dependency 8061: UserActionCreators */; moduleValue.setFlag(UserFlags.HAS_UNREAD_URGENT_MESSAGES, false); } } function _fun121772(a0) { // fn#121772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:837, offset: 0x02550f13, size: 42 bytes, params: 2, frame: 14 const closure = UrgentSystemDMManagerBase; env0_6(closure, a0); return env0_2(closure); } function UrgentSystemDMManagerBase(a0) { // fn#121773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:849, offset: 0x02550f3d, size: 164 bytes, params: 2, frame: 21 env1_3(this, UrgentSystemDMManagerBase); const value3 = env1_5(UrgentSystemDMManagerBase); const value6 = env1_4(this, _isNativeReflectConstruct_121767() ? global.Reflect.construct(value3, [], env1_5(this).constructor) : value3.apply(this, undefined)); value6.handleShowUrgentMessageAlert = a0; value6.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121774, MESSAGE_CREATE: MESSAGE_CREATE_121775, CHANNEL_SELECT: maybeClearUrgentMessage}; return value6; } function UrgentSystemDMManagerBasePOST_CONNECTION_OPEN() { // fn#121774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16045:1165, owner: UrgentSystemDMManagerBase.POST_CONNECTION_OPEN, offset: 0x02550fe1, size: 29 bytes, params: 1, frame: 11 maybeShowUrgentMessageModal(env0_0.handleShowUrgentMessageAlert); }