decord/source/modules/notifications/settings/native/NotificationSettingsMessageUnreadGuildActionSheet.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

62 lines
2.9 KiB
TypeScript

// Module ID: 10095
// Function ID: 10096
// Name: NotificationSettingsMessageUnreadGuildActionSheet
// Dependencies: [19, 4709, 673, 4710, 682, 21, 10084, 10096, 1233, 7059, 10079, 7054, 2]
// Exports: default
// Module 10095 (NotificationSettingsMessageUnreadGuildActionSheet)
import noopAll from "noop" /* 19 */;
import NotificationSettingsMessageUnreadActionSheetDefault from "NotificationSettingsMessageUnreadActionSheet" /* 10096 */;
import closure_3 from "updateUserGuildSettingsInternal" /* 4709 */;
import { UserNotificationSettings } from "ME" /* 673 */;
import { UnreadSetting } from "ReadStateTypes" /* 4710 */;
import { GuildNotificationSettingsFlags as closure_6 } from "MAX_FAVORITES" /* 682 */;
import { jsx } from "jsxProd" /* 21 */;
const require = arg1;
noopAll;
let result = require("set").fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageUnreadGuildActionSheet.tsx");
export default function NotificationSettingsMessageUnreadGuildActionSheet(guildId) {
const _require = guildId;
let obj = _require(10084);
const guildPresetSettings = obj.useGuildPresetSettings(guildId.guildId);
({ unread, notification } = guildPresetSettings);
let stringResult;
if (notification === UserNotificationSettings.ALL_MESSAGES) {
const intl = tmp(1233).intl;
stringResult = intl.string(tmp(1233).t.eP8yWU);
}
obj = {
disabledMentionOnlyWithReason: stringResult,
value: unread,
onChange(ONLY_MENTIONS) {
const guildFlags = closure_1_3.getGuildFlags(guildId.guildId);
let obj = closure_1_1(closure_1_2[9]);
if (ONLY_MENTIONS === closure_1_5.ALL_MESSAGES) {
let UNREADS_ONLY_MENTIONS = closure_1_6.UNREADS_ALL_MESSAGES;
} else {
UNREADS_ONLY_MENTIONS = closure_1_6.UNREADS_ONLY_MENTIONS;
}
obj = { flags: guildId(closure_1_2[10]).withGuildUnreadFlags(guildFlags, UNREADS_ONLY_MENTIONS) };
const NotificationLabel = guildId(closure_1_2[11]).NotificationLabel;
const result = obj.updateGuildNotificationSettings(guildId.guildId, obj, NotificationLabel.unreads(ONLY_MENTIONS));
}
};
return jsx(NotificationSettingsMessageUnreadActionSheetDefault, {
disabledMentionOnlyWithReason: stringResult,
value: unread,
onChange(ONLY_MENTIONS) {
const guildFlags = closure_1_3.getGuildFlags(guildId.guildId);
let obj = closure_1_1(closure_1_2[9]);
if (ONLY_MENTIONS === closure_1_5.ALL_MESSAGES) {
let UNREADS_ONLY_MENTIONS = closure_1_6.UNREADS_ALL_MESSAGES;
} else {
UNREADS_ONLY_MENTIONS = closure_1_6.UNREADS_ONLY_MENTIONS;
}
obj = { flags: guildId(closure_1_2[10]).withGuildUnreadFlags(guildFlags, UNREADS_ONLY_MENTIONS) };
const NotificationLabel = guildId(closure_1_2[11]).NotificationLabel;
const result = obj.updateGuildNotificationSettings(guildId.guildId, obj, NotificationLabel.unreads(ONLY_MENTIONS));
}
});
};