decord/source/modules/notifications/settings/native/NotificationSettingsMessageNotificationGuildActionSheet.tsx

49 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-26 06:04:24 +00:00
// Module ID: 10059
// Function ID: 10060
2026-07-20 16:05:17 +00:00
// Name: NotificationSettingsMessageNotificationGuildActionSheet
2026-08-26 06:04:24 +00:00
// Dependencies: [19, 4653, 676, 4654, 685, 21, 10054, 10060, 1236, 10049, 5434, 5429, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-26 06:04:24 +00:00
// Module 10059 (NotificationSettingsMessageNotificationGuildActionSheet)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-08-26 06:04:24 +00:00
import closure_3 from "updateUserGuildSettingsInternal" /* 4653 */;
2026-08-24 06:08:38 +00:00
import { UserNotificationSettings } from "ME" /* 676 */;
2026-08-26 06:04:24 +00:00
import { UnreadSetting } from "ReadStateTypes" /* 4654 */;
2026-08-24 06:08:38 +00:00
import { GuildNotificationSettingsFlags as closure_6 } from "MAX_FAVORITES" /* 685 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
let result = require("set").fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageNotificationGuildActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function NotificationSettingsMessageNotificationGuildActionSheet(guildId) {
2026-07-23 10:11:24 +00:00
const _require = guildId;
2026-08-26 06:04:24 +00:00
let obj = _require(10054);
2026-07-20 16:05:17 +00:00
const guildPresetSettings = obj.useGuildPresetSettings(guildId.guildId);
const unread = guildPresetSettings.unread;
const notification = guildPresetSettings.notification;
2026-07-29 08:29:29 +00:00
obj = { context: "guild", value: notification, allMessagesSubLabel: null, onChange: null };
2026-07-20 16:05:17 +00:00
let stringResult;
if (notification !== UserNotificationSettings.ALL_MESSAGES) {
if (unread !== UnreadSetting.ALL_MESSAGES) {
2026-07-29 08:29:29 +00:00
const intl = tmp(1236).intl;
stringResult = intl.string(tmp(1236).t.eP8yWU);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj[2] = stringResult;
obj[3] = function onChange(message_notifications) {
2026-07-20 16:05:17 +00:00
const obj = { message_notifications };
2026-08-24 06:08:38 +00:00
let tmp = message_notifications === closure_1_4.ALL_MESSAGES;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-08-24 06:08:38 +00:00
tmp = unread !== closure_1_5.ALL_MESSAGES;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
2026-08-24 06:08:38 +00:00
obj.flags = guildId(closure_1_2[9]).withGuildUnreadFlags(closure_1_3.getGuildFlags(guildId.guildId), closure_1_6.UNREADS_ALL_MESSAGES);
const obj2 = guildId(closure_1_2[9]);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const NotificationLabel = guildId(closure_1_2[11]).NotificationLabel;
const result = unread(closure_1_2[10]).updateGuildNotificationSettings(guildId.guildId, obj, NotificationLabel.notifications(message_notifications));
2026-07-20 16:05:17 +00:00
};
2026-08-26 06:04:24 +00:00
return jsx(unread(10060), { context: "guild", value: notification, allMessagesSubLabel: null, onChange: null });
2026-07-20 16:05:17 +00:00
};