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,101 @@
/* Metro module 11947; source: modules/notifications/settings/native/MuteAppDmActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 6275, 11759, 9216, 1244, 4573, 4578, 6613, 6610, 4080, 3857, 1305, 8194, 2] */
function _fun91694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:6, offset: 0x0206e06f, size: 422 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.sheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
object2.iconContainer = {'alignItems': 'center', 'marginBottom': 8};
object2.iconBackground = {'width': 48, 'height': 48};
object2.content = {padding: 16};
object2.headerText = {'textAlign': 'center', 'marginBottom': 8, 'paddingHorizontal': 16};
object2.infoText = {'textAlign': 'center', 'marginBottom': 16, 'paddingHorizontal': 16};
object2.dismissButtonContainer = {marginTop: 8};
const object3 = {'borderRadius': null, 'backgroundColor': null, 'height': 24, 'width': 24, 'padding': 4,
'alignContent': 'center'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_FEEDBACK_NOTIFICATION = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_NOTIFICATION;
object3.backgroundColor = BACKGROUND_FEEDBACK_NOTIFICATION;
object2.mutedNotificationContainer = object3;
object2.mutedNotification = {'width': 16, 'height': 16};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/MuteAppDmActionSheet.tsx');
exports.default = MuteAppDMActionSheet;
}
function MuteAppDMActionSheet({channel}) { // fn#91695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:837, offset: 0x0206e215, size: 674 bytes, params: 2, frame: 28
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
let value = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
value = <View style={styles.iconContainer}>{((Component) => <Component style={styles.iconBackground} IconComponent={BellIcon} active accessibilityLabel={Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.uAmAiL])} />)(value)}</View>;
const items2 = [value];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="heading-lg/bold" color="mobile-text-heading-primary" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uAmAiL)}</Text>;
items2[2] = <Text variant="text-md/normal" color="text-default" style={styles.infoText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mscFJU)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <Button variant="destructive" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uAmAiL)} onPress={onPress_91696} />;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
items2[4] = <View style={styles.dismissButtonContainer}><Button variant="secondary" text={Reflect.apply(string,
intl, [WAI6xu])} onPress={onPress_91698} /></View>;
return (
<BottomSheet startExpanded backgroundStyles={styles.sheet}>
<View style={styles.content}>
{items2}
</View>
</BottomSheet>
);
}
function MuteAppDMActionSheetOnPress() { // fn#91696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:1542, owner: MuteAppDMActionSheet.onPress, offset: 0x0206e4b7, size: 217 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const id = channel.id;
const NotificationLabels = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels;
const Muted = NotificationLabels.Muted;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [null, id, {muted: true}, Muted]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = value.open;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const EgGpkx = (require(1244) /* metro dependency 1244: indexNative */).t.EgGpkx;
Reflect.apply(open, value, [{key: 'NOTIFICATIONS_MUTED', content: Reflect.apply(string, intl, [EgGpkx]),
icon: icon_91697}]);
}
function MuteAppDMActionSheetOnPress_91698() { // fn#91698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:2054, owner: MuteAppDMActionSheet.onPress, offset: 0x0206e616, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onPressIcon_91697() { // fn#91697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:1761, owner: MuteAppDMActionSheet.onPress.icon, offset: 0x0206e590, size: 134 bytes, params: 1, frame: 19
const stylesBinding = styles;
const mutedNotificationContainer = stylesBinding.mutedNotificationContainer;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(8194) /* metro dependency 8194 */};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
iconProps.color = WHITE;
iconProps.style = stylesBinding.mutedNotification;
return (
<View style={mutedNotificationContainer}>
<Icon {...iconProps} />
</View>
);
}
@@ -0,0 +1,132 @@
/* Metro module 10940; source: modules/notifications/settings/native/NotificationSettingsChannel.tsx; dependencies: [31, 27, 4864, 33, 4501, 697, 10941, 1244, 4805, 1484, 5282, 6613, 6610, 566, 7972, 10943, 10944, 10948, 10955, 10961, 4578, 2] */
function _fun83878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:6, offset: 0x01f2c873, size: 264 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_8 = Reflect.apply(createStyles, value, [{screenContainer: {'flex': 1, 'backgroundColor': null,
'padding': 16, backgroundColor: BACKGROUND_BASE_LOW}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsChannel.tsx');
exports.default = NotificationSettingsChannel;
}
function NotificationSettingsChannel(a0) { // fn#83879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:385, offset: 0x01f2c97b, size: 870 bytes, params: 2, frame: 30
var r6;
var r5;
var NotificationSettingsMuteBanner;
var moduleValue4;
var Button;
var object13;
const env0_0 = a0;
const value2 = (require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */).useChannelPresetInheritance(a0.channel);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_1 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss);
const env0_2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(a0.channel);
const env0_3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const binding = env0_3;
binding.useLayoutEffect(_fun83880);
const value3 = binding.useCallback(_fun83883, [a0.channel]);
const value4 = binding.useCallback(_fun83884, [a0.channel]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserGuildSettingsStore],
_fun83885);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const muted = value5.muted;
if (muted) {
NotificationSettingsMuteBanner = (require(10943) /* metro dependency 10943: NotificationSettingsMuteBanner */).NotificationSettingsMuteBanner;
var notificationSettingsMuteBannerProps2 = {style: {marginBottom: 16},
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6MCxAy'])};
moduleValue4 = require(10943) /* metro dependency 10943: NotificationSettingsMuteBanner */;
notificationSettingsMuteBannerProps2.subtitle = moduleValue4.getMuteBannerSubtitleFromConfig(value5.config);
notificationSettingsMuteBannerProps2.onPressUnmute = value4;
r6 = <NotificationSettingsMuteBanner {...notificationSettingsMuteBannerProps2} />;
} else {
r6 = muted;
}
const items2 = [r6];
const NotificationSettingsChannelPresets = (require(10944) /* metro dependency 10944: NotificationSettingsPresets */).NotificationSettingsChannelPresets;
items2[1] = <NotificationSettingsChannelPresets channel={a0.channel} />;
const NotificationSettingsChannelMessageNotification = (require(10948) /* metro dependency 10948: NotificationSettingsMessageNotification */).NotificationSettingsChannelMessageNotification;
items2[2] = <NotificationSettingsChannelMessageNotification style={{marginTop: 24}} channel={a0.channel} />;
const NotificationSettingsChannelMessageUnread = (require(10955) /* metro dependency 10955: NotificationSettingsMessageUnread */).NotificationSettingsChannelMessageUnread;
items2[3] = <NotificationSettingsChannelMessageUnread style={{marginTop: 24}} channel={a0.channel} />;
items2[4] = a0.channel.isForumLikeChannel() && ((NotificationSettingsChannelPost) => <NotificationSettingsChannelPost style={{marginTop: 24}} channel={a0.channel} />)((require(10961) /* metro dependency 10961: NotificationSettingsChannelPost */).NotificationSettingsChannelPost);
const inherited = value2.inherited;
if (inherited) {
r5 = !inherited;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <View style={{marginTop: 24}}><Button variant="secondary" onPress={value3} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3PBFN6'])} /></View>;
}
items2[5] = r5;
return (
<Form style={styles.screenContainer}>
{items2}
</Form>
);
}
function _fun83880() { // fn#83880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:590, offset: 0x01f2cce1, size: 161 bytes, params: 1, frame: 22
var environment;
var value;
let binding = env0_3;
let setOptions = binding.setOptions;
let object2 = {};
object2.title = '' + env0_1 + ' (' + env0_2 + ')';
object2.headerTitle = headerTitle_83881;
Reflect.apply(setOptions, binding, [object2]);
if (env0_0.inGuildContext) {
binding = env0_3;
setOptions = binding.setOptions;
object2 = {};
value = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
object2.headerLeft = value.getHeaderBackButton(_fun83882);
Reflect.apply(setOptions, binding, [object2]);
}
}
function _fun83883() { // fn#83883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:814, offset: 0x01f2cdd6, size: 66 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
const updateChannelToGuildDefault = value.updateChannelToGuildDefault;
const binding = env0_0;
return Reflect.apply(updateChannelToGuildDefault, value, [binding.channel.guild_id, binding.channel.id]);
}
function _fun83884() { // fn#83884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:918, offset: 0x01f2ce18, size: 110 bytes, params: 1, frame: 20
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const binding = env0_0;
const guild_id = binding.channel.guild_id;
const id = binding.channel.id;
const NotificationLabels = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels;
const Unmuted = NotificationLabels.Unmuted;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guild_id, id, {muted: false}, Unmuted]);
}
function _fun83885() { // fn#83885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:1098, offset: 0x01f2ce86, size: 92 bytes, params: 1, frame: 15
const getChannelMuteConfig = UserGuildSettingsStore.getChannelMuteConfig;
const binding = env0_0;
return {config: Reflect.apply(getChannelMuteConfig, UserGuildSettingsStore, [binding.channel.guild_id,
binding.channel.id]), muted: UserGuildSettingsStore.isChannelMuted(binding.channel.guild_id,
binding.channel.id)};
}
function headerTitle_83881() { // fn#83881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:641, offset: 0x01f2cd82, size: 65 bytes, params: 1, frame: 15
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
return <NavigatorHeader title={env1_1} subtitle={env1_2} />;
}
function _fun83882() { // fn#83882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:769, offset: 0x01f2cdc3, size: 19 bytes, params: 1, frame: 9
return env1_3.popToTop();
}
@@ -0,0 +1,61 @@
/* Metro module 10961; source: modules/notifications/settings/native/NotificationSettingsChannelPost.tsx; dependencies: [31, 27, 4864, 33, 566, 6231, 1244, 8950, 6613, 2] */
function _fun83966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11147:6, offset: 0x01f31432, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsChannelPost.tsx');
exports.NotificationSettingsChannelPost = NotificationSettingsChannelPost;
}
function NotificationSettingsChannelPost(a0) { // fn#83967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11147:284, offset: 0x01f314e1, size: 329 bytes, params: 2, frame: 26
const env0_0 = a0;
const channel = a0.channel;
const env0_1 = channel.guild_id;
const env0_2 = channel.id;
const {muted, guildMuted,
newForumThreadsCreated} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserGuildSettingsStore],
_fun83968);
const style = a0.style;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.bK11jO]);
object.hasIcons = false;
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
string = intl.string;
const Rkgjph = (require(1244) /* metro dependency 1244: indexNative */).t.Rkgjph;
return (
<View style={style}>
<TableRowGroup {...object}>
<TableCheckboxRow
label={Reflect.apply(string, intl, [Rkgjph])}
checked={newForumThreadsCreated}
disabled={muted || guildMuted}
onPress={onPress_83969}
/>
</TableRowGroup>
</View>
);
}
function _fun83968() { // fn#83968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11147:404, offset: 0x01f3162a, size: 80 bytes, params: 1, frame: 15
const object2 = {};
const isChannelMuted = UserGuildSettingsStore.isChannelMuted;
const guild_idBinding = guild_id;
object2.muted = Reflect.apply(isChannelMuted, UserGuildSettingsStore, [guild_idBinding, id]);
object2.guildMuted = UserGuildSettingsStore.isMuted(guild_idBinding);
object2.newForumThreadsCreated = UserGuildSettingsStore.getNewForumThreadsCreated(env0_0.channel);
return object2;
}
function NotificationSettingsChannelPostOnPress() { // fn#83969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11147:809, owner: NotificationSettingsChannelPost.onPress, offset: 0x01f3167a, size: 58 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
value.setForumThreadsCreated(env0_0.channel, !newForumThreadsCreated);
}
@@ -0,0 +1,101 @@
/* Metro module 10948; source: modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx; dependencies: [31, 27, 33, 4501, 697, 10949, 4573, 1244, 5278, 10950, 10947, 4080, 10952, 1962, 10941, 10954, 2] */
function _fun83922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:6, offset: 0x01f2e823, size: 361 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = NotificationSettingsMessageNotification;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'borderColor': null, 'borderRadius': 20, 'borderWidth': 1, 'padding': 14};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object.borderColor = BACKGROUND_MOD_SUBTLE;
const env0_6 = Reflect.apply(createStyles, value, [{card: object, cta: {'textAlign': 'center', 'marginTop': 4},
label: {'textAlign': 'center', 'marginTop': 8}, header: {marginBottom: 8}, headerTitle: {marginBottom: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx');
exports.default = closure;
exports.NotificationSettingsGuildMessageNotification = NotificationSettingsGuildMessageNotification;
exports.NotificationSettingsChannelMessageNotification = NotificationSettingsChannelMessageNotification;
}
function NotificationSettingsMessageNotification(a0) { // fn#83923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:452, offset: 0x01f2e98c, size: 799 bytes, params: 2, frame: 34
const env0_0 = a0;
const value2 = undefined;
const styles = useStyles();
const value4 = (require(10949) /* metro dependency 10949: notificationSettingsPresetOptionUtils */).getPushNotificationSelectOptions().find(_fun83924);
const style = a0.style;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.header}><Text variant="text-sm/semibold" color="text-default" style={styles.headerTitle}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m22ZB'])}</Text><Text variant="text-xs/semibold" color="text-default">{a0.context === 'guild' ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4bP2ZZ']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R1j5+4'])}</Text></View>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: a0.onCustomize, activeOpacity: 0.6};
const items3 = [((Component) => <Component notificationSetting={a0.setting} />)(importDefault(10950) /* metro dependency 10950: NotificationSettingsMockMessage */)];
items3[1] = <Text variant="text-sm/medium" style={styles.label}>{(value4 == null ? value2 : value4.label) ?? 'unset'}</Text>;
const PressableOpacity2 = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
items3[2] = <PressableOpacity2 onPress={a0.onCustomize}><Text variant="text-sm/semibold" style={styles.cta} color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yxiV9W)}</Text></PressableOpacity2>;
return (
<View style={style}>
{view}
<PressableOpacity {...pressableOpacityProps}>
<View style={styles.card}>
{items3}
</View>
</PressableOpacity>
</View>
);
}
function NotificationSettingsGuildMessageNotification(a0) { // fn#83925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:1635, offset: 0x01f2ecc6, size: 108 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const value = require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */;
const useGuildPresetSettings = value.useGuildPresetSettings;
return (
<NotificationSettingsMessageNotification
context="guild"
style={style}
setting={Reflect.apply(useGuildPresetSettings, value, [a0.guildId]).notification}
onCustomize={onCustomize}
/>
);
}
function NotificationSettingsChannelMessageNotification(a0) { // fn#83927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:2007, offset: 0x01f2ed94, size: 108 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
const useChannelPresetSettings = value.useChannelPresetSettings;
return (
<NotificationSettingsMessageNotification
context="channel"
style={style}
setting={Reflect.apply(useChannelPresetSettings, value, [a0.channel]).notification}
onCustomize={onCustomize}
/>
);
}
function NotificationSettingsGuildMessageNotificationOnCustomize() { // fn#83926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:1848, owner: NotificationSettingsGuildMessageNotification.onCustomize, offset: 0x01f2ed32, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[11]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageNotificationGuildActionSheet', {guildId: env0_0.guildId}]);
}
function NotificationSettingsChannelMessageNotificationOnCustomize() { // fn#83928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:2226, owner: NotificationSettingsChannelMessageNotification.onCustomize, offset: 0x01f2ee00, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[11]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[15], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageNotificationChannelActionSheet', {channel: env0_0.channel}]);
}
@@ -0,0 +1,62 @@
/* Metro module 10953; source: modules/notifications/settings/native/NotificationSettingsMessageNotificationActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6275, 10950, 4573, 1244, 7988, 7987, 2] */
function _fun83941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11139:6, offset: 0x01f2f932, size: 326 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.sheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
object2.header = {'padding': 24, 'paddingTop': 0};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.content = {backgroundColor: BACKGROUND_BASE_LOWER, padding: 16};
object2.form = {'marginTop': 8, 'marginBottom': 16};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageNotificationActionSheet.tsx');
exports.default = NotificationSettingsMessageNotificationActionSheet;
}
function NotificationSettingsMessageNotificationActionSheet(a0) { // fn#83942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11139:548, offset: 0x01f2fa78, size: 663 bytes, params: 2, frame: 32
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const view = <View style={styles.header}>{((Component) => <Component notificationSetting={a0.value} />)(importDefault(10950) /* metro dependency 10950: NotificationSettingsMockMessage */)}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [<Text variant="text-sm/semibold">{Reflect.apply(string, intl, [t['1m22ZB']])}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted" />;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const value5 = a0.value;
const onChange = a0.onChange;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
string = intl.string;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
const items3 = [<TableRadioRow label={Reflect.apply(string, intl,
[t['HVah/3']])} value={ALL_MESSAGES} subLabel={a0.allMessagesSubLabel} />];
string = intl.string;
const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
items3[1] = <TableRadioRow label={Reflect.apply(string, intl, [t['tu+ZWJ']])} value={ONLY_MENTIONS} />;
string = intl.string;
const X4wWUi = (require(1244) /* metro dependency 1244: indexNative */).t.X4wWUi;
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
items3[2] = <TableRadioRow label={Reflect.apply(string, intl, [X4wWUi])} value={NO_MESSAGES} />;
items2[2] = <View style={styles.form}><TableRadioGroup defaultValue={value5} onChange={onChange} hasIcons={false}>{items3}</TableRadioGroup></View>;
return (
<BottomSheet startExpanded backgroundStyles={styles.sheet}>
{view}
<View style={styles.content}>
{items2}
</View>
</BottomSheet>
);
}
@@ -0,0 +1,72 @@
/* Metro module 10954; source: modules/notifications/settings/native/NotificationSettingsMessageNotificationChannelActionSheet.tsx; dependencies: [31, 4864, 661, 4865, 670, 33, 10941, 10953, 1244, 10942, 6613, 6610, 2] */
function _fun83943(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11140:6, offset: 0x01f2fd0f, size: 220 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageNotificationChannelActionSheet.tsx');
exports.default = NotificationSettingsMessageNotificationChannelActionSheet;
}
function NotificationSettingsMessageNotificationChannelActionSheet(a0) { // fn#83944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11140:374, offset: 0x01f2fdeb, size: 212 bytes, params: 2, frame: 20
var r5;
var intl;
const env0_0 = a0;
const value2 = undefined;
const {unread,
notification} = (require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */).useChannelPresetSettings(a0.channel);
const NotificationSettingsMessageNotificationActionSheet = importDefault(10953) /* metro dependency 10953: NotificationSettingsMessageNotificationActionSheet */;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (notification === ALL_MESSAGES) {
r5 = value2;
} else if (unread === UnreadSetting.ALL_MESSAGES) {
r5 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eP8yWU);
}
return (
<NotificationSettingsMessageNotificationActionSheet
context="channel"
value={notification}
allMessagesSubLabel={r5}
onChange={onChange_83945}
/>
);
}
function NotificationSettingsMessageNotificationChannelActionSheetOnChange(a0) { // fn#83945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11140:679, owner: NotificationSettingsMessageNotificationChannelActionSheet.onChange, offset: 0x01f2febf, size: 250 bytes, params: 2, frame: 21
var moduleValue;
var withChannelUnreadFlags;
var getChannelIdFlags;
var binding;
var channel;
var guild_id;
const object2 = {message_notifications: a0};
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (a0 === ALL_MESSAGES && unread !== UnreadSetting.ALL_MESSAGES) {
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
withChannelUnreadFlags = moduleValue.withChannelUnreadFlags;
getChannelIdFlags = UserGuildSettingsStore.getChannelIdFlags;
binding = env0_0;
channel = binding.channel;
guild_id = channel.guild_id;
channel = binding.channel;
object2.flags = Reflect.apply(withChannelUnreadFlags, moduleValue, [Reflect.apply(getChannelIdFlags,
UserGuildSettingsStore, [guild_id, channel.id]), ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES]);
}
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
binding = env0_0;
guild_id = binding.channel.guild_id;
const id = binding.channel.id;
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guild_id, id, object2,
NotificationLabel.notifications(a0)]);
}
@@ -0,0 +1,59 @@
/* Metro module 10952; source: modules/notifications/settings/native/NotificationSettingsMessageNotificationGuildActionSheet.tsx; dependencies: [31, 4864, 661, 4865, 670, 33, 10947, 10953, 1244, 10942, 6613, 6610, 2] */
function _fun83938(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11138:6, offset: 0x01f2f6ad, size: 220 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).GuildNotificationSettingsFlags;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageNotificationGuildActionSheet.tsx');
exports.default = NotificationSettingsMessageNotificationGuildActionSheet;
}
function NotificationSettingsMessageNotificationGuildActionSheet(a0) { // fn#83939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11138:370, offset: 0x01f2f789, size: 212 bytes, params: 2, frame: 20
var r5;
var intl;
const env0_0 = a0;
const value2 = undefined;
const {unread,
notification} = (require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */).useGuildPresetSettings(a0.guildId);
const NotificationSettingsMessageNotificationActionSheet = importDefault(10953) /* metro dependency 10953: NotificationSettingsMessageNotificationActionSheet */;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (notification === ALL_MESSAGES) {
r5 = value2;
} else if (unread === UnreadSetting.ALL_MESSAGES) {
r5 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eP8yWU);
}
return (
<NotificationSettingsMessageNotificationActionSheet
context="guild"
value={notification}
allMessagesSubLabel={r5}
onChange={onChange_83940}
/>
);
}
function NotificationSettingsMessageNotificationGuildActionSheetOnChange(a0) { // fn#83940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11138:669, owner: NotificationSettingsMessageNotificationGuildActionSheet.onChange, offset: 0x01f2f85d, size: 213 bytes, params: 2, frame: 19
var moduleValue;
const object2 = {message_notifications: a0};
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (a0 === ALL_MESSAGES && unread !== UnreadSetting.ALL_MESSAGES) {
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
object2.flags = moduleValue.withGuildUnreadFlags(UserGuildSettingsStore.getGuildFlags(env0_0.guildId),
GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES);
}
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
const guildId = env0_0.guildId;
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateGuildNotificationSettings, defaultImport, [guildId, object2,
NotificationLabel.notifications(a0)]);
}
@@ -0,0 +1,104 @@
/* Metro module 10955; source: modules/notifications/settings/native/NotificationSettingsMessageUnread.tsx; dependencies: [31, 27, 33, 4501, 697, 10949, 4573, 1244, 5278, 10956, 10947, 4080, 10958, 1962, 10941, 10960, 2] */
function _fun83946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:6, offset: 0x01f2ffb9, size: 351 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'borderColor': null, 'borderRadius': 20, 'borderWidth': 1, 'padding': 14};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object.borderColor = BACKGROUND_MOD_SUBTLE;
const env0_6 = Reflect.apply(createStyles, value, [{card: object, cta: {'marginTop': 4, 'textAlign': 'center'},
label: {'marginTop': 8, 'textAlign': 'center'}, header: {marginBottom: 8}, headerTitle: {marginBottom: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageUnread.tsx');
exports.NotificationSettingsGuildMessageUnread = NotificationSettingsGuildMessageUnread;
exports.NotificationSettingsChannelMessageUnread = NotificationSettingsChannelMessageUnread;
}
function NotificationSettingsMessageUnread(a0) { // fn#83947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:452, offset: 0x01f30118, size: 730 bytes, params: 2, frame: 34
const env0_0 = a0;
const value2 = undefined;
const styles = useStyles();
const value4 = (require(10949) /* metro dependency 10949: notificationSettingsPresetOptionUtils */).getUnreadSelectOptions().find(_fun83948);
const style = a0.style;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Tqd1Af = (require(1244) /* metro dependency 1244: indexNative */).t.Tqd1Af;
const text = <Text variant="text-sm/semibold" color="text-default" style={styles.headerTitle}>{Reflect.apply(string,
intl, [Tqd1Af])}</Text>;
string = intl.string;
const RpQgm5 = (require(1244) /* metro dependency 1244: indexNative */).t.RpQgm5;
const view = <View style={styles.header}>{text}<Text variant="text-xs/semibold" color="text-default">{Reflect.apply(string,
intl, [RpQgm5])}</Text></View>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: a0.onCustomize, activeOpacity: 0.6};
const items3 = [((Component) => <Component unreadSetting={a0.setting} />)(importDefault(10956) /* metro dependency 10956: NotificationSettingsMockChannels */)];
items3[1] = <Text variant="text-sm/medium" style={styles.label}>{(value4 == null ? value2 : value4.label) ?? 'unset'}</Text>;
const PressableOpacity2 = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
items3[2] = <PressableOpacity2 onPress={a0.onCustomize}><Text variant="text-sm/semibold" style={styles.cta} color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yxiV9W)}{' '}</Text></PressableOpacity2>;
return (
<View style={style}>
{view}
<PressableOpacity {...pressableOpacityProps}>
<View style={styles.card}>
{items3}
</View>
</PressableOpacity>
</View>
);
}
function NotificationSettingsGuildMessageUnread(a0) { // fn#83949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1490, offset: 0x01f303f2, size: 100 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const value = require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */;
const useGuildPresetSettings = value.useGuildPresetSettings;
return (
<NotificationSettingsMessageUnread
style={style}
setting={Reflect.apply(useGuildPresetSettings, value, [a0.guildId]).unread}
onCustomize={onCustomize}
/>
);
}
function NotificationSettingsChannelMessageUnread(a0) { // fn#83951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1811, offset: 0x01f304b8, size: 100 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
const useChannelPresetSettings = value.useChannelPresetSettings;
return (
<NotificationSettingsMessageUnread
style={style}
setting={Reflect.apply(useChannelPresetSettings, value, [a0.channel]).unread}
onCustomize={onCustomize}
/>
);
}
function NotificationSettingsGuildMessageUnreadOnCustomize() { // fn#83950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1669, owner: NotificationSettingsGuildMessageUnread.onCustomize, offset: 0x01f30456, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[11]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageUnreadActionSheet', {guildId: env0_0.guildId}]);
}
function NotificationSettingsChannelMessageUnreadOnCustomize() { // fn#83952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1994, owner: NotificationSettingsChannelMessageUnread.onCustomize, offset: 0x01f3051c, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[11]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[15], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageUnreadActionSheet', {channel: env0_0.channel}]);
}
@@ -0,0 +1,62 @@
/* Metro module 10959; source: modules/notifications/settings/native/NotificationSettingsMessageUnreadActionSheet.tsx; dependencies: [31, 27, 4865, 33, 4501, 697, 6275, 10956, 4573, 1244, 7988, 7987, 2] */
function _fun83961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11145:6, offset: 0x01f30df8, size: 326 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.sheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
object2.header = {'padding': 24, 'paddingTop': 0};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.content = {backgroundColor: BACKGROUND_BASE_LOWER, padding: 16};
object2.form = {'marginTop': 8, 'marginBottom': 16};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageUnreadActionSheet.tsx');
exports.default = NotificationSettingsMessageUnreadActionSheet;
}
function NotificationSettingsMessageUnreadActionSheet(a0) { // fn#83962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11145:531, offset: 0x01f30f3e, size: 642 bytes, params: 2, frame: 32
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const view = <View style={styles.header}>{((Component) => <Component unreadSetting={a0.value} />)(importDefault(10956) /* metro dependency 10956: NotificationSettingsMockChannels */)}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Tqd1Af = t.Tqd1Af;
const items2 = [<Text variant="text-sm/semibold">{Reflect.apply(string, intl, [Tqd1Af])}</Text>];
string = intl.string;
const RpQgm5 = (require(1244) /* metro dependency 1244: indexNative */).t.RpQgm5;
items2[1] = <Text variant="text-xs/medium" color="text-muted">{Reflect.apply(string, intl, [RpQgm5])}</Text>;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const value5 = a0.value;
const onChange = a0.onChange;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
string = intl.string;
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
const tableRadioRow = <TableRadioRow label={Reflect.apply(string, intl, [t['HVah/3']])} value={ALL_MESSAGES} />;
const tableRadioRowProps2 = {subLabel: a0.disabledMentionOnlyWithReason,
disabled: a0.disabledMentionOnlyWithReason != null,
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['tu+ZWJ'])};
const ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
tableRadioRowProps2.value = ONLY_MENTIONS;
items2[2] = <View style={styles.form}><TableRadioGroup defaultValue={value5} onChange={onChange} hasIcons={false}>{tableRadioRow}<TableRadioRow {...tableRadioRowProps2} /></TableRadioGroup></View>;
return (
<BottomSheet startExpanded backgroundStyles={styles.sheet}>
{view}
<View style={styles.content}>
{items2}
</View>
</BottomSheet>
);
}
@@ -0,0 +1,59 @@
/* Metro module 10960; source: modules/notifications/settings/native/NotificationSettingsMessageUnreadChannelActionSheet.tsx; dependencies: [31, 4864, 661, 4865, 670, 33, 10941, 10959, 1244, 6613, 10942, 6610, 2] */
function _fun83963(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11146:6, offset: 0x01f311c0, size: 220 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageUnreadChannelActionSheet.tsx');
exports.default = NotificationSettingsMessageUnreadChannelActionSheet;
}
function NotificationSettingsMessageUnreadChannelActionSheet(a0) { // fn#83964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11146:368, offset: 0x01f3129c, size: 184 bytes, params: 2, frame: 20
var r5;
var intl;
const env0_0 = a0;
const value2 = undefined;
const {unread,
notification} = (require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */).useChannelPresetSettings(a0.channel);
const NotificationSettingsMessageUnreadActionSheet = importDefault(10959) /* metro dependency 10959: NotificationSettingsMessageUnreadActionSheet */;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (notification !== ALL_MESSAGES) {
r5 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eP8yWU);
}
return (
<NotificationSettingsMessageUnreadActionSheet
value={unread}
disabledMentionOnlyWithReason={r5}
onChange={onChange_83965}
/>
);
}
function NotificationSettingsMessageUnreadChannelActionSheetOnChange(a0) { // fn#83965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11146:639, owner: NotificationSettingsMessageUnreadChannelActionSheet.onChange, offset: 0x01f31354, size: 222 bytes, params: 2, frame: 24
const getChannelIdFlags = UserGuildSettingsStore.getChannelIdFlags;
const binding = env0_0;
let guild_id = binding.channel.guild_id;
let id = binding.channel.id;
const value3 = Reflect.apply(getChannelIdFlags, UserGuildSettingsStore, [guild_id, id]);
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
guild_id = binding.channel.guild_id;
id = binding.channel.id;
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, [value3,
a0 === ALL_MESSAGES ? ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES : ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS]);
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guild_id, id, object2, NotificationLabel.unreads(a0)]);
}
@@ -0,0 +1,57 @@
/* Metro module 10958; source: modules/notifications/settings/native/NotificationSettingsMessageUnreadGuildActionSheet.tsx; dependencies: [31, 4864, 661, 4865, 670, 33, 10947, 10959, 1244, 6613, 10942, 6610, 2] */
function _fun83958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11144:6, offset: 0x01f30bae, size: 220 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).GuildNotificationSettingsFlags;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageUnreadGuildActionSheet.tsx');
exports.default = NotificationSettingsMessageUnreadGuildActionSheet;
}
function NotificationSettingsMessageUnreadGuildActionSheet(a0) { // fn#83959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11144:364, offset: 0x01f30c8a, size: 184 bytes, params: 2, frame: 21
var r6;
var intl;
const env0_0 = a0;
const value2 = undefined;
const {unread,
notification} = (require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */).useGuildPresetSettings(a0.guildId);
const NotificationSettingsMessageUnreadActionSheet = importDefault(10959) /* metro dependency 10959: NotificationSettingsMessageUnreadActionSheet */;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (notification !== ALL_MESSAGES) {
r6 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eP8yWU);
}
return (
<NotificationSettingsMessageUnreadActionSheet
disabledMentionOnlyWithReason={r6}
value={unread}
onChange={onChange_83960}
/>
);
}
function NotificationSettingsMessageUnreadGuildActionSheetOnChange(a0) { // fn#83960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11144:631, owner: NotificationSettingsMessageUnreadGuildActionSheet.onChange, offset: 0x01f30d42, size: 182 bytes, params: 2, frame: 22
const getGuildFlags = UserGuildSettingsStore.getGuildFlags;
const binding = env0_0;
let guildId = binding.guildId;
const value3 = Reflect.apply(getGuildFlags, UserGuildSettingsStore, [guildId]);
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
guildId = binding.guildId;
const object2 = {};
const notificationSettingsFlagUtilsModule = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
const withGuildUnreadFlags = notificationSettingsFlagUtilsModule.withGuildUnreadFlags;
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object2.flags = Reflect.apply(withGuildUnreadFlags, notificationSettingsFlagUtilsModule, [value3,
a0 === ALL_MESSAGES ? GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES : GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS]);
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateGuildNotificationSettings, defaultImport, [guildId, object2, NotificationLabel.unreads(a0)]);
}
@@ -0,0 +1,82 @@
/* Metro module 10956; source: modules/notifications/settings/native/NotificationSettingsMockChannels.tsx; dependencies: [31, 27, 4865, 33, 4501, 697, 1244, 10957, 6691, 4573, 1305, 2] */
function _fun83953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11142:6, offset: 0x01f3057e, size: 303 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_7 = Reflect.apply(createStyles, value, [{card: {'backgroundColor': null, 'overflow': 'hidden',
'borderRadius': 10, 'paddingVertical': 8, backgroundColor: BACKGROUND_SURFACE_HIGH},
channel: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'paddingVertical': 4,
'justifyContent': 'space-between', 'paddingRight': 12}, channelName: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMockChannels.tsx');
exports.default = NotificationSettingsMockChannels;
}
function NotificationSettingsMockChannels({unreadSetting}) { // fn#83954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11142:628, offset: 0x01f306ad, size: 366 bytes, params: 2, frame: 22
const styles = useStyles();
let object2 = {'badged': true, 'unread': true};
let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object2.resolvedUnreadSetting = ALL_MESSAGES;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const EjLobP = (require(1244) /* metro dependency 1244: indexNative */).t.EjLobP;
object2.name = Reflect.apply(string, intl, [EjLobP]);
const items2 = [object2];
object2 = {'badged': false, 'unread': true};
let ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
object2.resolvedUnreadSetting = ONLY_MENTIONS;
string = intl.string;
const Wgpwpp = (require(1244) /* metro dependency 1244: indexNative */).t.Wgpwpp;
object2.name = Reflect.apply(string, intl, [Wgpwpp]);
items2[1] = object2;
object2 = {'badged': false, 'unread': false};
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
object2.resolvedUnreadSetting = ONLY_MENTIONS;
object2.name = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g9VImh);
items2[2] = object2;
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
if (unreadSetting === ALL_MESSAGES) {
items2[1].resolvedUnreadSetting = UnreadSetting.ALL_MESSAGES;
}
return (
<View style={styles.card}>
{items2.map(_fun83955)}
</View>
);
}
function _fun83955(a0) { // fn#83955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11142:1114, offset: 0x01f3081b, size: 398 bytes, params: 2, frame: 24
const value = environment.__proto__;
const {channel, channelName} = styles;
const value3 = undefined;
const StaticChannelIndicator = importDefault(10957) /* metro dependency 10957: StaticChannelIndicator */;
const unread = a0.unread;
let resolvedUnreadSetting = a0.resolvedUnreadSetting;
const items2 = [<StaticChannelIndicator unread={unread} resolvedUnreadSetting={resolvedUnreadSetting} />];
const TextIcon = (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
resolvedUnreadSetting = a0.resolvedUnreadSetting;
let ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
items2[1] = <TextIcon style={{marginLeft: 12}} size="xs" color={resolvedUnreadSetting !== ONLY_MENTIONS ? value3 : 'text-muted'} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
resolvedUnreadSetting = a0.resolvedUnreadSetting;
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
items2[2] = <Text style={{marginLeft: 4}} variant="text-sm/semibold" color={resolvedUnreadSetting !== ONLY_MENTIONS ? value3 : 'text-muted'}>{a0.name}</Text>;
const view = <View style={channelName}>{items2}</View>;
const Badge = (require(1305) /* metro dependency 1305: native */).Badge;
return (
<View style={channel} key={a0.name}>
{view}
<Badge value={a0.badged ? 1 : 0} />
</View>
);
}
@@ -0,0 +1,93 @@
/* Metro module 10950; source: modules/notifications/settings/native/NotificationSettingsMockMessage.tsx; dependencies: [31, 27, 1878, 661, 33, 4501, 697, 566, 3995, 4017, 4504, 4507, 4573, 1244, 1305, 10951, 2] */
function _fun83932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:6, offset: 0x01f2f092, size: 379 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.card = {'backgroundColor': null, 'overflow': 'hidden', 'borderRadius': 10, 'padding': 16,
backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.cardContent = {'display': 'flex', 'flexDirection': 'row'};
object2.cardMessage = {'marginLeft': 12, 'maxWidth': 240};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.overlay = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
backgroundColor: BACKGROUND_BASE_LOWEST};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function NotificationSettingsMockMessageTsx1(){const{withTiming,opacity,timingStandard}=this.__closure;return{opacity:withTiming(opacity.get(),timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMockMessage.tsx');
exports.default = NotificationSettingsMockMessage;
}
function NotificationSettingsMockMessage(a0) { // fn#83933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:821, offset: 0x01f2f20d, size: 996 bytes, params: 2, frame: 29
var r14;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const r17 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(currentUser) ?? 'Roka';
let notificationSetting = a0.notificationSetting;
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
const value4 = notificationSetting === NO_MESSAGES;
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value4 ? 0.8 : 0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = NotificationSettingsMockMessage_;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, opacity: value7,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
closure.__workletHash = 6531430956793;
closure.__initData = env0_10;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
notificationSetting = a0.notificationSetting;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
if (notificationSetting === ALL_MESSAGES) {
r14 = <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WYyzI5)}</Text>;
} else {
items2 = [<Text variant="text-sm/normal" color="text-link">{'@'}{r17}{' '}</Text>];
items2[1] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WYyzI5);
r14 = <View><Text variant="text-sm/medium" color="text-default">{items2}</Text></View>;
}
env0_3.useEffect(_fun83936, [value7, value4]);
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {source: importDefault(10951) /* metro dependency 10951 */};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const LARGE_48 = AvatarSizes.LARGE_48;
avatarProps.size = LARGE_48;
const items3 = [<View><Avatar {...avatarProps} /></View>];
items3[1] = <View style={styles.cardMessage}><Text variant="text-sm/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qSq0tD)}</Text>{r14}</View>;
const view = <View style={styles.cardContent}>{items3}</View>;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={styles.card}>
{view}
<View2 style={[value8, styles.overlay]} />
</View>
);
}
function NotificationSettingsMockMessage_() { // fn#83935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:1082, owner: NotificationSettingsMockMessage._, offset: 0x01f2f5f1, size: 78 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
object2.opacity = value.withTiming(env0_1.get(),
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
return object2;
}
function _fun83936() { // fn#83936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:1683, offset: 0x01f2f63f, size: 40 bytes, params: 1, frame: 12
const binding = env0_1;
binding.set(result ? 0.8 : 0);
}
@@ -0,0 +1,70 @@
/* Metro module 10943; source: modules/notifications/settings/native/NotificationSettingsMuteBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 4578, 1244, 2] */
function _fun83902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11129:6, offset: 0x01f2d835, size: 279 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'padding': 16, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg + 8;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object.backgroundColor = BACKGROUND_BRAND;
const env0_5 = Reflect.apply(createStyles, value, [{card: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMuteBanner.tsx');
exports.NotificationSettingsMuteBanner = NotificationSettingsMuteBanner;
exports.getMuteBannerSubtitleFromConfig = getMuteBannerSubtitleFromConfig;
}
function NotificationSettingsMuteBanner(a0) { // fn#83903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11129:495, offset: 0x01f2d94c, size: 317 bytes, params: 2, frame: 23
const styles = useStyles();
const items2 = [a0.style];
items2[1] = styles.card;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let value = <Text variant="text-md/semibold" color="white">{a0.title}</Text>;
value = <View style={{'flex': 1,
'marginRight': 8}}>{value}<Text variant="text-xs/medium" color="white">{a0.subtitle}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const YqAjXy = (require(1244) /* metro dependency 1244: indexNative */).t.YqAjXy;
return (
<View style={items2}>
{value}
<Button
text={Reflect.apply(string, intl, [YqAjXy])}
onPress={a0.onPressUnmute}
variant="primary-overlay"
/>
</View>
);
}
function getMuteBannerSubtitleFromConfig(a0) { // fn#83904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11129:944, offset: 0x01f2da89, size: 241 bytes, params: 2, frame: 20
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var C7m4oh;
var object2;
var date;
if (a0?.end_time == null) {
r0 = intl.string(t['tFqP/P']);
} else {
formatToPlainString = intl.formatToPlainString;
C7m4oh = t.C7m4oh;
object2 = {};
date = new global.Date(a0.end_time);
object2.endTime = date.toLocaleString((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{'month': 'numeric', 'day': 'numeric', 'hour': 'numeric', 'minute': '2-digit'});
r0 = Reflect.apply(formatToPlainString, intl, [C7m4oh, object2]);
}
return r0;
}
@@ -0,0 +1,197 @@
/* Metro module 10944; source: modules/notifications/settings/native/NotificationSettingsPresets.tsx; dependencies: [31, 27, 33, 1244, 4867, 4073, 10945, 10629, 4501, 697, 8853, 4573, 4578, 9221, 10947, 10941, 2] */
function _fun83905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:6, offset: 0x01f2db7a, size: 294 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'padding': 16, 'minHeight': 82, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg + 8;
const REDESIGN_INPUT_CONTROL_ACTIVE_BG = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_INPUT_CONTROL_ACTIVE_BG;
object.backgroundColor = REDESIGN_INPUT_CONTROL_ACTIVE_BG;
const env0_6 = Reflect.apply(createStyles, value, [{customContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsPresets.tsx');
exports.NotificationSettingsGuildPresets = NotificationSettingsGuildPresets;
exports.NotificationSettingsChannelPresets = NotificationSettingsChannelPresets;
}
function NotificationSettingsPresets(a0) { // fn#83906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:391, offset: 0x01f2dca0, size: 1086 bytes, params: 2, frame: 29
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var items3;
var Button;
const env0_0 = a0;
const value2 = undefined;
const styles = useStyles();
let preset = a0.preset;
const Presets = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets;
let ALL_MESSAGES = Presets.ALL_MESSAGES;
const value3 = 0;
const r8 = preset === ALL_MESSAGES ? value3 : a0.preset === (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets.MENTIONS ? 1 : a0.preset !== (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets.NOTHING ? value2 : 2;
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object5 = {pageWidth: value3, onSetActiveIndex: onSetActiveIndex_83907};
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object6.label = Reflect.apply(string, intl, [t.hZrr6k]);
ALL_MESSAGES = Presets.ALL_MESSAGES;
object6.id = ALL_MESSAGES;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
object6.icon = <CircleCheckIcon />;
object6.page = null;
const items4 = [object6];
const object7 = {};
object7.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y59NJm);
const MENTIONS = Presets.MENTIONS;
object7.id = MENTIONS;
const MagicWandIcon = (require(10945) /* metro dependency 10945: MagicWandIcon */).MagicWandIcon;
object7.icon = <MagicWandIcon />;
object7.page = null;
items4[1] = object7;
const object8 = {};
object8.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pGn/bJ']);
const NOTHING = Presets.NOTHING;
object8.id = NOTHING;
const BellSlashIcon = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object8.icon = <BellSlashIcon />;
object8.page = null;
items4[2] = object8;
object5.items = items4;
object5.defaultIndex = r8;
const value6 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object5]);
value6.useEffect(_fun83908, [r8, value6]);
preset = a0.preset;
const CUSTOM = Presets.CUSTOM;
if (preset === CUSTOM) {
var viewBindingProps = {style: styles.customContainer};
string = intl.string;
items2 = [<Text variant="text-sm/semibold">{Reflect.apply(string, intl, [t['32yow9']])}</Text>];
string = intl.string;
items2[1] = <Text variant="text-xs/medium">{Reflect.apply(string, intl, [t.l3doVX])}</Text>;
items3 = [<View style={{'flex': 1, 'marginRight': 8}}>{items2}</View>];
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items3[1] = <Button variant="secondary" text={Reflect.apply(string, intl,
[t['ztO+l+']])} onPress={onPress_83909} />;
r0 = <View {...viewBindingProps}>{items3}</View>;
} else {
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
r0 = <SegmentedControl variant="experimental_Large" state={value6} />;
}
return r0;
}
function NotificationSettingsGuildPresets(a0) { // fn#83910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:2011, offset: 0x01f2e2c0, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
const value = require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */;
const useGuildPresetSettings = value.useGuildPresetSettings;
return (
<NotificationSettingsPresets
preset={Reflect.apply(useGuildPresetSettings, value, [a0.guildId]).preset}
updatePreset={updatePreset}
/>
);
}
function NotificationSettingsChannelPresets(a0) { // fn#83912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:2247, offset: 0x01f2e351, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
const value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
const useChannelPresetSettings = value.useChannelPresetSettings;
return (
<NotificationSettingsPresets
preset={Reflect.apply(useChannelPresetSettings, value, [a0.channel]).preset}
updatePreset={updatePreset}
/>
);
}
function NotificationSettingsPresetsOnSetActiveIndex(a0) { // fn#83907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:633, owner: NotificationSettingsPresets.onSetActiveIndex, offset: 0x01f2e0de, size: 372 bytes, params: 2, frame: 14
var r0;
var preset;
const Presets = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets;
var binding;
var updatePreset;
let value = a0 === 0;
if (value) {
preset = env0_0.preset;
value = environment.__proto__;
value = preset !== Presets.ALL_MESSAGES;
r0 = value;
} else {
r0 = value;
}
if (r0) {
binding = env0_0;
updatePreset = binding.updatePreset;
value = environment.__proto__;
Reflect.apply(updatePreset, binding, [Presets.ALL_MESSAGES]);
}
value = a0 === 1;
if (value) {
preset = env0_0.preset;
value = environment.__proto__;
value = preset !== Presets.MENTIONS;
r0 = value;
} else {
r0 = value;
}
if (r0) {
binding = env0_0;
updatePreset = binding.updatePreset;
value = environment.__proto__;
Reflect.apply(updatePreset, binding, [Presets.MENTIONS]);
}
value = a0 === 2;
if (value) {
preset = env0_0.preset;
value = environment.__proto__;
value = preset !== Presets.NOTHING;
r0 = value;
} else {
r0 = value;
}
if (r0) {
binding = env0_0;
updatePreset = binding.updatePreset;
value = environment.__proto__;
Reflect.apply(updatePreset, binding, [Presets.NOTHING]);
}
}
function _fun83908() { // fn#83908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:1303, offset: 0x01f2e252, size: 53 bytes, params: 1, frame: 12
if (!(env0_1 == null || env0_1 >= 3)) {
env0_2.setActiveIndex(env0_1);
}
}
function NotificationSettingsPresetsOnPress() { // fn#83909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:1752, owner: NotificationSettingsPresets.onPress, offset: 0x01f2e287, size: 57 bytes, params: 1, frame: 13
const binding = env0_0;
const updatePreset = binding.updatePreset;
const Presets = (require(4867) /* metro dependency 4867: notificationSettingsPresetUtils */).Presets;
const MENTIONS = Presets.MENTIONS;
Reflect.apply(updatePreset, binding, [MENTIONS]);
}
function NotificationSettingsGuildPresetsUpdatePreset(a0) { // fn#83911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:2164, owner: NotificationSettingsGuildPresets.updatePreset, offset: 0x01f2e31b, size: 54 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */;
return value.updateGuildPreset(env0_0.guildId, a0);
}
function NotificationSettingsChannelPresetsUpdatePreset(a0) { // fn#83913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11130:2404, owner: NotificationSettingsChannelPresets.updatePreset, offset: 0x01f2e3ac, size: 70 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
const updateChannelPreset = value.updateChannelPreset;
const binding = env0_0;
return Reflect.apply(updateChannelPreset, value, [binding.channel.guild_id, binding.channel.id, a0]);
}
@@ -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;
}