Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,205 @@
/* Metro module 10941; source: modules/notifications/settings/utils/notficationSettingsChannelFlagUtils.tsx; dependencies: [57, 1379, 4864, 661, 4865, 670, 632, 4867, 10939, 6613, 10942, 6610, 2] */
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');
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
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 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 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 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];
}
}
return items;
}
@@ -0,0 +1,35 @@
/* Metro module 10942; source: modules/notifications/settings/utils/notificationSettingsFlagUtils.tsx; dependencies: [670, 1391, 2] */
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]);
var UNREADS_ALL_MESSAGES = GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES;
return moduleValue.removeFlags(a0, UNREADS_ALL_MESSAGES, GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
};
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');
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
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);
}
@@ -0,0 +1,78 @@
/* Metro module 10947; source: modules/notifications/settings/utils/notificationSettingsGuildFlagUtils.tsx; dependencies: [4864, 661, 670, 4867, 6613, 10942, 6610, 632, 2] */
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');
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 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);
}
@@ -0,0 +1,50 @@
/* Metro module 10949; source: modules/notifications/settings/utils/notificationSettingsPresetOptionUtils.tsx; dependencies: [661, 4865, 1244, 2] */
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');
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
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;
}
@@ -0,0 +1,82 @@
/* Metro module 4867; source: modules/notifications/settings/utils/notificationSettingsPresetUtils.tsx; dependencies: [661, 4865, 4242, 1244, 2] */
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');
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 = (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;
}