This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,205 +1,216 @@
/* Metro module 10941; source: modules/notifications/settings/utils/notficationSettingsChannelFlagUtils.tsx; dependencies: [57, 1379, 4864, 661, 4865, 670, 632, 4867, 10939, 6613, 10942, 6610, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import NotificationSettingsModalActionCreators from '../../../../actions/NotificationSettingsModalActionCreators.tsx'; /* Metro dependency 6613 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsConstantsModule from '../../../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as NotificationSettingsPresetUtilsModule from './notificationSettingsPresetUtils.tsx'; /* Metro dependency 4867 */
import * as NotificationSettingsUtilsModule from '../../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
import * as NotificationUtilsModule from '../../NotificationUtils.tsx'; /* Metro dependency 10939 */
import * as NotificationSettingsFlagUtilsModule from './notificationSettingsFlagUtils.tsx'; /* Metro dependency 10942 */
function _fun83886(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:6, offset: 0x01f2cee2, size: 283 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_7 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_8 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/utils/notficationSettingsChannelFlagUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/utils/notficationSettingsChannelFlagUtils.tsx');
exports.useChannelPresetSettings = useChannelPresetSettings;
exports.useChannelPresetInheritance = useChannelPresetInheritance;
exports.updateChannelPreset = updateChannelPreset;
exports.updateChannelToGuildDefault = updateChannelToGuildDefault;
exports.updateChannelUnreadSetting = updateChannelUnreadSetting;
exports.updateChannelNotificationSetting = updateChannelNotificationSetting;
}
function useChannelPresetSettings(a0) { // fn#83887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:366, offset: 0x01f2cffd, size: 142 bytes, params: 2, frame: 19
const env0_0 = a0;
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const value = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [[userGuildSettingsStoreBinding],
_fun83888]);
const value2 = UseStateFromStoresModule.useStateFromStores([userGuildSettingsStoreBinding], _fun83889);
object = {unread: value, notification: value2};
object.preset = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).presetFromSettings(value,
value2);
return object;
function _fun83888() { // fn#83888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:441, offset: 0x01f2d08b, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.resolveUnreadSetting(env0_0);
}
function useChannelPresetSettings(a0) { // fn#83887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:366, offset: 0x01f2cffd, size: 142 bytes, params: 2, frame: 19
var object2;
const env0_0 = a0;
const value = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserGuildSettingsStore],
_fun83888);
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserGuildSettingsStore],
_fun83889);
object2 = {unread: value, notification: value2};
object2.preset = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).presetFromSettings(value,
value2);
return object2;
}
function _fun83889() { // fn#83889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:507, offset: 0x01f2d0a6, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.resolvedMessageNotifications(env0_0);
}
function useChannelPresetInheritance(a0) { // fn#83890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:649, offset: 0x01f2d0c1, size: 208 bytes, params: 2, frame: 22
const env0_0 = a0;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
let useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value2 = Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[UserGuildSettingsStore],
_fun83891]);
const moduleValue2 = useStateFromStoresModule;
useStateFromStoresArray = moduleValue2.useStateFromStoresArray;
const value = env0_3(Reflect.apply(useStateFromStoresArray, moduleValue2, [[UserGuildSettingsStore, ChannelStore],
_fun83892, [a0.guild_id, a0.parent_id, value2]]), 2);
return {inherited: !value2.includes(a0.id), inheritedFrom: value[0], inheritedPreset: value[1]};
}
function updateChannelPreset(a0, a1, a2) { // fn#83893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:1373, offset: 0x01f2d2ec, size: 528 bytes, params: 4, frame: 24
var defaultImport;
var updateChannelOverrideSettings;
var object2;
var moduleValue;
const NotificationLabels = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels;
var defaultImport2;
var moduleValue2;
var defaultImport3;
var moduleValue3;
const channelIdFlags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
const Presets = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets;
const ALL_MESSAGES = Presets.ALL_MESSAGES;
if (a2 === ALL_MESSAGES) {
defaultImport3 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport3.updateChannelOverrideSettings;
object2 = {};
object2.message_notifications = UserNotificationSettings.ALL_MESSAGES;
moduleValue3 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue3.withChannelUnreadFlags(channelIdFlags,
ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES);
Reflect.apply(updateChannelOverrideSettings, defaultImport3, [a0, a1, object2, NotificationLabels.PresetAll]);
} else if (a2 === Presets.MENTIONS) {
defaultImport2 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport2.updateChannelOverrideSettings;
object2 = {};
object2.message_notifications = UserNotificationSettings.ONLY_MENTIONS;
moduleValue2 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue2.withChannelUnreadFlags(channelIdFlags,
ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateChannelOverrideSettings, defaultImport2, [a0, a1, object2,
NotificationLabels.PresetMentions]);
} else if (a2 === Presets.NOTHING) {
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
object2 = {};
object2.message_notifications = UserNotificationSettings.NO_MESSAGES;
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue.withChannelUnreadFlags(channelIdFlags,
ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object2,
NotificationLabels.PresetNothing]);
}
}
function updateChannelToGuildDefault(a0, a1) { // fn#83894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:2125, offset: 0x01f2d4fc, size: 143 bytes, params: 3, frame: 23
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const object2 = {};
const NULL = UserNotificationSettings.NULL;
object2.message_notifications = NULL;
const notificationSettingsFlagUtilsModule = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
const resetChannelUnreadFlags = notificationSettingsFlagUtilsModule.resetChannelUnreadFlags;
const getChannelIdFlags = UserGuildSettingsStore.getChannelIdFlags;
object2.flags = Reflect.apply(resetChannelUnreadFlags, notificationSettingsFlagUtilsModule,
[Reflect.apply(getChannelIdFlags, UserGuildSettingsStore, [a0, a1])]);
const NotificationLabels = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels;
const PresetDefault = NotificationLabels.PresetDefault;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object2, PresetDefault]);
}
function useChannelPresetInheritance(a0) { // fn#83890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:649, offset: 0x01f2d0c1, size: 208 bytes, params: 2, frame: 22
const env0_0 = a0;
let useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const value2 = Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[userGuildSettingsStoreBinding],
_fun83891]);
useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const value = Module00057(Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[userGuildSettingsStoreBinding,
ChannelStore], _fun83892, [a0.guild_id, a0.parent_id, value2]]), 2);
return {inherited: !value2.includes(a0.id), inheritedFrom: value[0], inheritedPreset: value[1]};
function _fun83891() { // fn#83891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:732, offset: 0x01f2d191, size: 80 bytes, params: 1, frame: 14
const value = environment.__proto__;
const filterOverrides = NotificationUtilsModule.filterOverrides;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const getChannelOverrides = userGuildSettingsStoreBinding.getChannelOverrides;
return Reflect.apply(filterOverrides, NotificationUtilsModule, [Reflect.apply(getChannelOverrides,
userGuildSettingsStoreBinding, [env0_0.guild_id]), {'ignoreMute': true, 'ignoreUnreadSetting': false,
'ignoreNotificationSetting': false}]);
}
function updateChannelUnreadSetting(a0, a1, a2) { // fn#83895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:2378, offset: 0x01f2d58b, size: 181 bytes, params: 4, frame: 24
const channelIdFlags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const object2 = {};
const notificationSettingsFlagUtilsModule = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
const withChannelUnreadFlags = notificationSettingsFlagUtilsModule.withChannelUnreadFlags;
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object2.flags = Reflect.apply(withChannelUnreadFlags, notificationSettingsFlagUtilsModule, [channelIdFlags,
a2 === ALL_MESSAGES ? ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES : ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS]);
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object2, NotificationLabel.unreads(a2)]);
}
function _fun83892() { // fn#83892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:906, offset: 0x01f2d1e1, size: 267 bytes, params: 1, frame: 19
var items2;
var binding;
var moduleValue;
var presetName;
var moduleValue2;
var presetFromSettings;
var userGuildSettingsStoreBinding;
var getGuildUnreadSetting;
var guild_id;
var getMessageNotifications;
var moduleValue3;
var moduleValue4;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0.parent_id);
if (channel == null) {
moduleValue = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetName = moduleValue.presetName;
moduleValue2 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetFromSettings = moduleValue2.presetFromSettings;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
getGuildUnreadSetting = userGuildSettingsStoreBinding.getGuildUnreadSetting;
binding = env0_0;
guild_id = binding.guild_id;
value = Reflect.apply(getGuildUnreadSetting, userGuildSettingsStoreBinding, [guild_id]);
getMessageNotifications = userGuildSettingsStoreBinding.getMessageNotifications;
guild_id = binding.guild_id;
value = Reflect.apply(presetName, moduleValue, [Reflect.apply(presetFromSettings, moduleValue2, [value,
Reflect.apply(getMessageNotifications, userGuildSettingsStoreBinding, [guild_id])])]);
items2 = ['guild', value];
} else {
binding = env0_1;
if (binding.includes(channel.id)) {
moduleValue3 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetName = moduleValue3.presetName;
moduleValue4 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetFromSettings = moduleValue4.presetFromSettings;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
value = userGuildSettingsStoreBinding.resolveUnreadSetting(channel);
value = Reflect.apply(presetName, moduleValue3, [Reflect.apply(presetFromSettings, moduleValue4, [value,
userGuildSettingsStoreBinding.resolvedMessageNotifications(channel)])]);
items2 = ['parent', value];
} else {
moduleValue = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetName = moduleValue.presetName;
moduleValue2 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetFromSettings = moduleValue2.presetFromSettings;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
getGuildUnreadSetting = userGuildSettingsStoreBinding.getGuildUnreadSetting;
binding = env0_0;
guild_id = binding.guild_id;
value = Reflect.apply(getGuildUnreadSetting, userGuildSettingsStoreBinding, [guild_id]);
getMessageNotifications = userGuildSettingsStoreBinding.getMessageNotifications;
guild_id = binding.guild_id;
value = Reflect.apply(presetName, moduleValue, [Reflect.apply(presetFromSettings, moduleValue2, [value,
Reflect.apply(getMessageNotifications, userGuildSettingsStoreBinding, [guild_id])])]);
items2 = ['guild', value];
}
}
return items2;
}
function updateChannelNotificationSetting(a0, a1, a2) { // fn#83896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:2678, offset: 0x01f2d640, size: 92 bytes, params: 4, frame: 19
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, {message_notifications: a2},
NotificationLabel.notifications(a2)]);
}
}
function _fun83888() { // fn#83888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:441, offset: 0x01f2d08b, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.resolveUnreadSetting(env0_0);
}
function _fun83889() { // fn#83889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:507, offset: 0x01f2d0a6, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.resolvedMessageNotifications(env0_0);
}
function _fun83891() { // fn#83891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:732, offset: 0x01f2d191, size: 80 bytes, params: 1, frame: 14
const value = environment.__proto__;
const notificationUtilsModule = require(10939) /* metro dependency 10939: NotificationUtils */;
const filterOverrides = notificationUtilsModule.filterOverrides;
const getChannelOverrides = UserGuildSettingsStore.getChannelOverrides;
return Reflect.apply(filterOverrides, notificationUtilsModule, [Reflect.apply(getChannelOverrides,
UserGuildSettingsStore, [env0_0.guild_id]), {'ignoreMute': true, 'ignoreUnreadSetting': false,
'ignoreNotificationSetting': false}]);
}
function _fun83892() { // fn#83892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:906, offset: 0x01f2d1e1, size: 267 bytes, params: 1, frame: 19
var items;
var binding;
var moduleValue;
var presetName;
var moduleValue2;
var presetFromSettings;
var getGuildUnreadSetting;
var guild_id;
var getMessageNotifications;
var moduleValue3;
var moduleValue4;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0.parent_id);
if (channel == null) {
moduleValue = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetName = moduleValue.presetName;
moduleValue2 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetFromSettings = moduleValue2.presetFromSettings;
getGuildUnreadSetting = UserGuildSettingsStore.getGuildUnreadSetting;
binding = env0_0;
guild_id = binding.guild_id;
value = Reflect.apply(getGuildUnreadSetting, UserGuildSettingsStore, [guild_id]);
getMessageNotifications = UserGuildSettingsStore.getMessageNotifications;
guild_id = binding.guild_id;
value = Reflect.apply(presetName, moduleValue, [Reflect.apply(presetFromSettings, moduleValue2, [value,
Reflect.apply(getMessageNotifications, UserGuildSettingsStore, [guild_id])])]);
items = ['guild', value];
} else {
binding = env0_1;
if (binding.includes(channel.id)) {
moduleValue3 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetName = moduleValue3.presetName;
moduleValue4 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetFromSettings = moduleValue4.presetFromSettings;
value = UserGuildSettingsStore.resolveUnreadSetting(channel);
value = Reflect.apply(presetName, moduleValue3, [Reflect.apply(presetFromSettings, moduleValue4, [value,
UserGuildSettingsStore.resolvedMessageNotifications(channel)])]);
items = ['parent', value];
} else {
moduleValue = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetName = moduleValue.presetName;
moduleValue2 = require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */;
presetFromSettings = moduleValue2.presetFromSettings;
getGuildUnreadSetting = UserGuildSettingsStore.getGuildUnreadSetting;
binding = env0_0;
guild_id = binding.guild_id;
value = Reflect.apply(getGuildUnreadSetting, UserGuildSettingsStore, [guild_id]);
getMessageNotifications = UserGuildSettingsStore.getMessageNotifications;
guild_id = binding.guild_id;
value = Reflect.apply(presetName, moduleValue, [Reflect.apply(presetFromSettings, moduleValue2, [value,
Reflect.apply(getMessageNotifications, UserGuildSettingsStore, [guild_id])])]);
items = ['guild', value];
function updateChannelPreset(a0, a1, a2) { // fn#83893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:1373, offset: 0x01f2d2ec, size: 528 bytes, params: 4, frame: 24
var defaultImport;
var updateChannelOverrideSettings;
var object;
var moduleValue;
const NotificationLabels = (NotificationSettingsUtilsModule).NotificationLabels;
var defaultImport2;
var moduleValue2;
var defaultImport3;
var moduleValue3;
const channelIdFlags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
const Presets = (NotificationSettingsPresetUtilsModule).Presets;
const ALL_MESSAGES = Presets.ALL_MESSAGES;
if (a2 === ALL_MESSAGES) {
defaultImport3 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport3.updateChannelOverrideSettings;
object = {};
object.message_notifications = UserNotificationSettings.ALL_MESSAGES;
moduleValue3 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object.flags = moduleValue3.withChannelUnreadFlags(channelIdFlags,
ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES);
Reflect.apply(updateChannelOverrideSettings, defaultImport3, [a0, a1, object, NotificationLabels.PresetAll]);
} else if (a2 === Presets.MENTIONS) {
defaultImport2 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport2.updateChannelOverrideSettings;
object = {};
object.message_notifications = UserNotificationSettings.ONLY_MENTIONS;
moduleValue2 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object.flags = moduleValue2.withChannelUnreadFlags(channelIdFlags,
ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateChannelOverrideSettings, defaultImport2, [a0, a1, object,
NotificationLabels.PresetMentions]);
} else if (a2 === Presets.NOTHING) {
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
object = {};
object.message_notifications = UserNotificationSettings.NO_MESSAGES;
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object.flags = moduleValue.withChannelUnreadFlags(channelIdFlags,
ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object, NotificationLabels.PresetNothing]);
}
}
return items;
function updateChannelToGuildDefault(a0, a1) { // fn#83894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:2125, offset: 0x01f2d4fc, size: 143 bytes, params: 3, frame: 23
const defaultImport = NotificationSettingsModalActionCreators;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const object = {};
const NULL = UserNotificationSettings.NULL;
object.message_notifications = NULL;
const resetChannelUnreadFlags = NotificationSettingsFlagUtilsModule.resetChannelUnreadFlags;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const getChannelIdFlags = userGuildSettingsStoreBinding.getChannelIdFlags;
object.flags = Reflect.apply(resetChannelUnreadFlags, NotificationSettingsFlagUtilsModule,
[Reflect.apply(getChannelIdFlags, userGuildSettingsStoreBinding, [a0, a1])]);
const NotificationLabels = (NotificationSettingsUtilsModule).NotificationLabels;
const PresetDefault = NotificationLabels.PresetDefault;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object, PresetDefault]);
}
function updateChannelUnreadSetting(a0, a1, a2) { // fn#83895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:2378, offset: 0x01f2d58b, size: 181 bytes, params: 4, frame: 24
const channelIdFlags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
const defaultImport = NotificationSettingsModalActionCreators;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const object = {};
const withChannelUnreadFlags = NotificationSettingsFlagUtilsModule.withChannelUnreadFlags;
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object.flags = Reflect.apply(withChannelUnreadFlags, NotificationSettingsFlagUtilsModule, [channelIdFlags,
a2 === ALL_MESSAGES ? ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES : ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS]);
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object, NotificationLabel.unreads(a2)]);
}
function updateChannelNotificationSetting(a0, a1, a2) { // fn#83896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11127:2678, offset: 0x01f2d640, size: 92 bytes, params: 4, frame: 19
const defaultImport = NotificationSettingsModalActionCreators;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, {message_notifications: a2},
NotificationLabel.notifications(a2)]);
}
}
global.__d(_fun83886, 10941, [57, 1379, 4864, 661, 4865, 670, 632, 4867, 10939, 6613, 10942, 6610,
2]) /* metro module 10941, dependencies: [57, 1379, 4864, 661, 4865, 670, 632, 4867, 10939, 6613, 10942, 6610, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 10942; source: modules/notifications/settings/utils/notificationSettingsFlagUtils.tsx; dependencies: [670, 1391, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserSettingsConstantsModule from '../../../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
import * as FlagUtilsModule from '../../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
function _fun83897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11128:6, offset: 0x01f2d69c, size: 179 bytes, params: 8, frame: 19
const closure = function(a0) {
var moduleValue = importAll(dependencyMap[1]);
@@ -7,29 +11,25 @@ function _fun83897(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingsConstantsModule = require(670) /* metro dependency 670: UserSettingsConstants */;
const env0_2 = userSettingsConstantsModule.GuildNotificationSettingsFlags;
const env0_3 = userSettingsConstantsModule.ChannelNotificationSettingsFlags;
const closure2 = function(a0) {
var moduleValue = importAll(dependencyMap[1]);
var UNREADS_ALL_MESSAGES = ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES;
return moduleValue.removeFlags(a0, UNREADS_ALL_MESSAGES,
ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsFlagUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsFlagUtils.tsx');
exports.resetGuildUnreadFlags = closure;
exports.withGuildUnreadFlags = withGuildUnreadFlags;
exports.resetChannelUnreadFlags = closure2;
exports.withChannelUnreadFlags = withChannelUnreadFlags;
function withGuildUnreadFlags(a0, a1) { // fn#83900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11128:563, offset: 0x01f2d7c9, size: 54 bytes, params: 3, frame: 14
return FlagUtilsModule.addFlag(resetGuildUnreadFlags(a0), a1);
}
function withChannelUnreadFlags(a0, a1) { // fn#83901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11128:725, offset: 0x01f2d7ff, size: 54 bytes, params: 3, frame: 14
return FlagUtilsModule.addFlag(resetChannelUnreadFlags(a0), a1);
}
}
function withGuildUnreadFlags(a0, a1) { // fn#83900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11128:563, offset: 0x01f2d7c9, size: 54 bytes, params: 3, frame: 14
const flagUtilsModule = importAll(1391) /* metro dependency 1391: FlagUtils */;
return flagUtilsModule.addFlag(resetGuildUnreadFlags(a0), a1);
}
function withChannelUnreadFlags(a0, a1) { // fn#83901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11128:725, offset: 0x01f2d7ff, size: 54 bytes, params: 3, frame: 14
const flagUtilsModule = importAll(1391) /* metro dependency 1391: FlagUtils */;
return flagUtilsModule.addFlag(resetChannelUnreadFlags(a0), a1);
}
global.__d(_fun83897, 10942, [670, 1391, 2]) /* metro module 10942, dependencies: [670, 1391, 2] */;
@@ -1,78 +1,84 @@
/* Metro module 10947; source: modules/notifications/settings/utils/notificationSettingsGuildFlagUtils.tsx; dependencies: [4864, 661, 670, 4867, 6613, 10942, 6610, 632, 2] */
import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsConstantsModule from '../../../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
import * as NotificationSettingsPresetUtilsModule from './notificationSettingsPresetUtils.tsx'; /* Metro dependency 4867 */
import * as NotificationSettingsUtilsModule from '../../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
function _fun83917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:6, offset: 0x01f2e4c2, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_5 = (require(670) /* metro dependency 670: UserSettingsConstants */).GuildNotificationSettingsFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsGuildFlagUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsGuildFlagUtils.tsx');
exports.updateGuildPreset = updateGuildPreset;
exports.useGuildPresetSettings = useGuildPresetSettings;
}
function updateGuildPreset(a0, a1) { // fn#83918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:311, offset: 0x01f2e571, size: 494 bytes, params: 3, frame: 22
var defaultImport;
var updateGuildNotificationSettings;
var object2;
var moduleValue;
const NotificationLabels = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels;
var defaultImport2;
var moduleValue2;
var defaultImport3;
var moduleValue3;
const guildFlags = UserGuildSettingsStore.getGuildFlags(a0);
const Presets = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets;
const ALL_MESSAGES = Presets.ALL_MESSAGES;
if (a1 === ALL_MESSAGES) {
defaultImport3 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateGuildNotificationSettings = defaultImport3.updateGuildNotificationSettings;
object2 = {};
object2.message_notifications = UserNotificationSettings.ALL_MESSAGES;
moduleValue3 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue3.withGuildUnreadFlags(guildFlags,
GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES);
Reflect.apply(updateGuildNotificationSettings, defaultImport3, [a0, object2, NotificationLabels.PresetAll]);
} else if (a1 === Presets.MENTIONS) {
defaultImport2 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateGuildNotificationSettings = defaultImport2.updateGuildNotificationSettings;
object2 = {};
object2.message_notifications = UserNotificationSettings.ONLY_MENTIONS;
moduleValue2 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue2.withGuildUnreadFlags(guildFlags,
GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateGuildNotificationSettings, defaultImport2, [a0, object2,
NotificationLabels.PresetMentions]);
} else if (a1 === Presets.NOTHING) {
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
object2 = {};
object2.message_notifications = UserNotificationSettings.NO_MESSAGES;
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue.withGuildUnreadFlags(guildFlags,
GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateGuildNotificationSettings, defaultImport, [a0, object2, NotificationLabels.PresetNothing]);
function updateGuildPreset(a0, a1) { // fn#83918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:311, offset: 0x01f2e571, size: 494 bytes, params: 3, frame: 22
var defaultImport;
var updateGuildNotificationSettings;
var object;
var moduleValue;
const NotificationLabels = (NotificationSettingsUtilsModule).NotificationLabels;
var defaultImport2;
var moduleValue2;
var defaultImport3;
var moduleValue3;
const guildFlags = UserGuildSettingsStore.getGuildFlags(a0);
const Presets = (NotificationSettingsPresetUtilsModule).Presets;
const ALL_MESSAGES = Presets.ALL_MESSAGES;
if (a1 === ALL_MESSAGES) {
defaultImport3 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateGuildNotificationSettings = defaultImport3.updateGuildNotificationSettings;
object = {};
object.message_notifications = UserNotificationSettings.ALL_MESSAGES;
moduleValue3 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object.flags = moduleValue3.withGuildUnreadFlags(guildFlags,
GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES);
Reflect.apply(updateGuildNotificationSettings, defaultImport3, [a0, object, NotificationLabels.PresetAll]);
} else if (a1 === Presets.MENTIONS) {
defaultImport2 = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateGuildNotificationSettings = defaultImport2.updateGuildNotificationSettings;
object = {};
object.message_notifications = UserNotificationSettings.ONLY_MENTIONS;
moduleValue2 = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object.flags = moduleValue2.withGuildUnreadFlags(guildFlags,
GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateGuildNotificationSettings, defaultImport2, [a0, object, NotificationLabels.PresetMentions]);
} else if (a1 === Presets.NOTHING) {
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
object = {};
object.message_notifications = UserNotificationSettings.NO_MESSAGES;
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object.flags = moduleValue.withGuildUnreadFlags(guildFlags,
GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
Reflect.apply(updateGuildNotificationSettings, defaultImport, [a0, object, NotificationLabels.PresetNothing]);
}
}
function useGuildPresetSettings(a0) { // fn#83919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:1036, offset: 0x01f2e75f, size: 142 bytes, params: 2, frame: 19
const env0_0 = a0;
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const guildUnreadSetting = Reflect.apply(useStateFromStores, UseStateFromStoresModule,
[[userGuildSettingsStoreBinding], _fun83920]);
const messageNotifications = UseStateFromStoresModule.useStateFromStores([userGuildSettingsStoreBinding], _fun83921);
object = {unread: guildUnreadSetting, notification: messageNotifications};
object.preset = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).presetFromSettings(guildUnreadSetting,
messageNotifications);
return object;
function _fun83920() { // fn#83920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:1109, offset: 0x01f2e7ed, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.getGuildUnreadSetting(env0_0);
}
function _fun83921() { // fn#83921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:1176, offset: 0x01f2e808, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.getMessageNotifications(env0_0);
}
}
}
function useGuildPresetSettings(a0) { // fn#83919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:1036, offset: 0x01f2e75f, size: 142 bytes, params: 2, frame: 19
var object2;
const env0_0 = a0;
const guildUnreadSetting = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserGuildSettingsStore],
_fun83920);
const messageNotifications = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserGuildSettingsStore],
_fun83921);
object2 = {unread: guildUnreadSetting, notification: messageNotifications};
object2.preset = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).presetFromSettings(guildUnreadSetting,
messageNotifications);
return object2;
}
function _fun83920() { // fn#83920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:1109, offset: 0x01f2e7ed, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.getGuildUnreadSetting(env0_0);
}
function _fun83921() { // fn#83921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11133:1176, offset: 0x01f2e808, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.getMessageNotifications(env0_0);
}
global.__d(_fun83917, 10947, [4864, 661, 670, 4867, 6613, 10942, 6610, 632,
2]) /* metro module 10947, dependencies: [4864, 661, 670, 4867, 6613, 10942, 6610, 632, 2] */;
@@ -1,50 +1,52 @@
/* Metro module 10949; source: modules/notifications/settings/utils/notificationSettingsPresetOptionUtils.tsx; dependencies: [661, 4865, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
function _fun83929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11135:6, offset: 0x01f2ee62, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_3 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsPresetOptionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsPresetOptionUtils.tsx');
exports.getPushNotificationSelectOptions = getPushNotificationSelectOptions;
exports.getUnreadSelectOptions = getUnreadSelectOptions;
function getPushNotificationSelectOptions() { // fn#83930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11135:302, offset: 0x01f2eefa, size: 218 bytes, params: 1, frame: 18
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
const items2 = [{label: Reflect.apply(string, intl, [t['HVah/3']]), value: ALL_MESSAGES}];
object = {};
object.label = intl.string(t['tu+ZWJ']);
const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
object.value = ONLY_MENTIONS;
items2[1] = object;
string = intl.string;
const X4wWUi = t.X4wWUi;
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
items2[2] = {label: Reflect.apply(string, intl, [X4wWUi]), value: NO_MESSAGES};
return items2;
}
function getUnreadSelectOptions(a0) { // fn#83931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11135:540, offset: 0x01f2efd4, size: 190 bytes, params: 2, frame: 18
const value2 = undefined;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
const items2 = [{label: Reflect.apply(string, intl, [t['HVah/3']]), value: ALL_MESSAGES}];
object = {};
const ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
object.value = ONLY_MENTIONS;
object.label = intl.string(t['tu+ZWJ']);
const notificationSetting = a0 == null ? value2 : a0.notificationSetting;
ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
object.disabled = notificationSetting === ALL_MESSAGES;
items2[1] = object;
return items2;
}
}
function getPushNotificationSelectOptions() { // fn#83930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11135:302, offset: 0x01f2eefa, size: 218 bytes, params: 1, frame: 18
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
const items2 = [{label: Reflect.apply(string, intl, [t['HVah/3']]), value: ALL_MESSAGES}];
object2 = {};
object2.label = intl.string(t['tu+ZWJ']);
const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
object2.value = ONLY_MENTIONS;
items2[1] = object2;
string = intl.string;
const X4wWUi = t.X4wWUi;
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
items2[2] = {label: Reflect.apply(string, intl, [X4wWUi]), value: NO_MESSAGES};
return items2;
}
function getUnreadSelectOptions(a0) { // fn#83931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11135:540, offset: 0x01f2efd4, size: 190 bytes, params: 2, frame: 18
var object2;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
const items2 = [{label: Reflect.apply(string, intl, [t['HVah/3']]), value: ALL_MESSAGES}];
object2 = {};
const ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
object2.value = ONLY_MENTIONS;
object2.label = intl.string(t['tu+ZWJ']);
const notificationSetting = a0 == null ? value2 : a0.notificationSetting;
ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
object2.disabled = notificationSetting === ALL_MESSAGES;
items2[1] = object2;
return items2;
}
global.__d(_fun83929, 10949, [661, 4865, 1244, 2]) /* metro module 10949, dependencies: [661, 4865, 1244, 2] */;
@@ -1,82 +1,95 @@
/* Metro module 4867; source: modules/notifications/settings/utils/notificationSettingsPresetUtils.tsx; dependencies: [661, 4865, 4242, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as Module04242Module from '../../../../by-id/module-04242.js'; /* Metro dependency 4242 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
function _fun42613(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:6, offset: 0x0113e3a9, size: 217 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_3 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsPresetUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsPresetUtils.tsx');
exports.Presets = {ALL_MESSAGES: 'all_messages', MENTIONS: 'mentions', NOTHING: 'nothing', CUSTOM: 'custom'};
exports.presetFromSettings = presetFromSettings;
exports.presetName = presetName;
exports.arePresetSettingsUnset = arePresetSettingsUnset;
function presetFromSettings(a0, a1) { // fn#42614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:412, offset: 0x0113e482, size: 287 bytes, params: 3, frame: 16
const value2 = (Module04242Module).match([a1, a0]);
let ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
items2 = [ALL_MESSAGES];
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
items2[1] = ALL_MESSAGES;
let value = value2.with(items2, _fun42615);
let ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
let UNSET = UnreadSetting.UNSET;
value = value.with([ONLY_MENTIONS, UNSET], _fun42616);
ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
items2 = [ONLY_MENTIONS];
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
items2[1] = ONLY_MENTIONS;
value = value.with(items2, _fun42617);
let NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
UNSET = UnreadSetting.UNSET;
value = value.with([NO_MESSAGES, UNSET], _fun42618);
NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
value = value.with([NO_MESSAGES, ONLY_MENTIONS], _fun42619);
return value.otherwise(_fun42620);
function _fun42615() { // fn#42615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:511, offset: 0x0113e5a1, size: 15 bytes, params: 1, frame: 1
return env1_4.ALL_MESSAGES;
}
function _fun42616() { // fn#42616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:564, offset: 0x0113e5b0, size: 15 bytes, params: 1, frame: 1
return env1_4.MENTIONS;
}
function _fun42617() { // fn#42617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:621, offset: 0x0113e5b0, size: 15 bytes, params: 1, frame: 1
return env1_4.MENTIONS;
}
function _fun42618() { // fn#42618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:668, offset: 0x0113e5bf, size: 15 bytes, params: 1, frame: 1
return env1_4.NOTHING;
}
function _fun42619() { // fn#42619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:722, offset: 0x0113e5bf, size: 15 bytes, params: 1, frame: 1
return env1_4.NOTHING;
}
function _fun42620() { // fn#42620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:749, offset: 0x0113e5ce, size: 15 bytes, params: 1, frame: 1
return env1_4.CUSTOM;
}
}
function presetName(a0) { // fn#42621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:778, offset: 0x0113e5dd, size: 149 bytes, params: 2, frame: 15
const value2 = (Module04242Module).match(a0);
const binding = env0_4;
const ALL_MESSAGES = binding.ALL_MESSAGES;
let value = value2.with(ALL_MESSAGES, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t.hZrr6k);
});
const MENTIONS = binding.MENTIONS;
value = value.with(MENTIONS, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t.y59NJm);
});
const NOTHING = binding.NOTHING;
value = value.with(NOTHING, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t['pGn/bJ']);
});
const CUSTOM = binding.CUSTOM;
value = value.with(CUSTOM, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t['32yow9']);
});
return value.exhaustive();
}
function arePresetSettingsUnset(a0, a1) { // fn#42626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:1115, offset: 0x0113e76a, size: 67 bytes, params: 3, frame: 5
let r0 = a0 != null && a0 !== UnreadSetting.UNSET;
r0 = !r0 ? a1 != null && a1 !== UserNotificationSettings.NULL : r0;
return !r0;
}
}
function presetFromSettings(a0, a1) { // fn#42614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:412, offset: 0x0113e482, size: 287 bytes, params: 3, frame: 16
const value2 = (require(4242) /* metro dependency 4242 */).match([a1, a0]);
let ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
items2 = [ALL_MESSAGES];
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
items2[1] = ALL_MESSAGES;
let value = value2.with(items2, _fun42615);
let ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
let UNSET = UnreadSetting.UNSET;
value = value.with([ONLY_MENTIONS, UNSET], _fun42616);
ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
items2 = [ONLY_MENTIONS];
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
items2[1] = ONLY_MENTIONS;
value = value.with(items2, _fun42617);
let NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
UNSET = UnreadSetting.UNSET;
value = value.with([NO_MESSAGES, UNSET], _fun42618);
NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
value = value.with([NO_MESSAGES, ONLY_MENTIONS], _fun42619);
return value.otherwise(_fun42620);
}
function presetName(a0) { // fn#42621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:778, offset: 0x0113e5dd, size: 149 bytes, params: 2, frame: 15
const value2 = (require(4242) /* metro dependency 4242 */).match(a0);
const binding = env0_4;
const ALL_MESSAGES = binding.ALL_MESSAGES;
let value = value2.with(ALL_MESSAGES, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t.hZrr6k);
});
const MENTIONS = binding.MENTIONS;
value = value.with(MENTIONS, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t.y59NJm);
});
const NOTHING = binding.NOTHING;
value = value.with(NOTHING, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t['pGn/bJ']);
});
const CUSTOM = binding.CUSTOM;
value = value.with(CUSTOM, function() {
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t['32yow9']);
});
return value.exhaustive();
}
function arePresetSettingsUnset(a0, a1) { // fn#42626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:1115, offset: 0x0113e76a, size: 67 bytes, params: 3, frame: 5
let r0 = a0 != null && a0 !== UnreadSetting.UNSET;
r0 = !r0 ? a1 != null && a1 !== UserNotificationSettings.NULL : r0;
return !r0;
}
function _fun42615() { // fn#42615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:511, offset: 0x0113e5a1, size: 15 bytes, params: 1, frame: 1
return env1_4.ALL_MESSAGES;
}
function _fun42616() { // fn#42616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:564, offset: 0x0113e5b0, size: 15 bytes, params: 1, frame: 1
return env1_4.MENTIONS;
}
function _fun42618() { // fn#42618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:668, offset: 0x0113e5bf, size: 15 bytes, params: 1, frame: 1
return env1_4.NOTHING;
}
function _fun42620() { // fn#42620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:749, offset: 0x0113e5ce, size: 15 bytes, params: 1, frame: 1
return env1_4.CUSTOM;
}
global.__d(_fun42613, 4867, [661, 4865, 4242, 1244,
2]) /* metro module 4867, dependencies: [661, 4865, 4242, 1244, 2] */;