Files
discord-decomp/sources/modules/notifications/settings/native/NotificationSettingsMessageNotificationGuildActionSheet.tsx
T
2026-07-27 16:20:00 +03:00

60 lines
3.9 KiB
TypeScript

/* 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)]);
}