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

63 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 10109
// Function ID: 10110
2026-07-20 16:05:17 +00:00
// Name: NotificationSettingsMessageUnreadGuildActionSheet
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 5043, 676, 5044, 685, 21, 10098, 10110, 1236, 6798, 10091, 6795, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 10109 (NotificationSettingsMessageUnreadGuildActionSheet)
2026-07-29 08:29:29 +00:00
import "noop";
import updateUserGuildSettingsInternal from "updateUserGuildSettingsInternal";
2026-07-23 10:11:24 +00:00
import { UserNotificationSettings } from "ME";
import { UnreadSetting } from "ReadStateTypes";
import { GuildNotificationSettingsFlags as closure_6 } from "MAX_FAVORITES";
import { jsx } from "jsxProd";
const require = arg1;
let result = require("ME").fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageUnreadGuildActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function NotificationSettingsMessageUnreadGuildActionSheet(guildId) {
let notification;
let unread;
2026-07-23 10:11:24 +00:00
const _require = guildId;
2026-08-15 05:55:55 +00:00
let obj = _require(10098);
2026-07-20 16:05:17 +00:00
const guildPresetSettings = obj.useGuildPresetSettings(guildId.guildId);
({ unread, notification } = guildPresetSettings);
let stringResult;
if (notification === UserNotificationSettings.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 = {
disabledMentionOnlyWithReason: stringResult,
value: unread,
onChange(ONLY_MENTIONS) {
const guildFlags = outer1_3.getGuildFlags(guildId.guildId);
let obj = outer1_1(outer1_2[9]);
if (ONLY_MENTIONS === outer1_5.ALL_MESSAGES) {
let UNREADS_ONLY_MENTIONS = outer1_6.UNREADS_ALL_MESSAGES;
} else {
UNREADS_ONLY_MENTIONS = outer1_6.UNREADS_ONLY_MENTIONS;
}
obj = { flags: guildId(outer1_2[10]).withGuildUnreadFlags(guildFlags, UNREADS_ONLY_MENTIONS) };
const NotificationLabel = guildId(outer1_2[11]).NotificationLabel;
const result = obj.updateGuildNotificationSettings(guildId.guildId, obj, NotificationLabel.unreads(ONLY_MENTIONS));
2026-07-20 16:05:17 +00:00
}
};
2026-08-15 05:55:55 +00:00
return jsx(importDefault(10110), {
2026-07-29 08:29:29 +00:00
disabledMentionOnlyWithReason: stringResult,
value: unread,
onChange(ONLY_MENTIONS) {
const guildFlags = outer1_3.getGuildFlags(guildId.guildId);
let obj = outer1_1(outer1_2[9]);
if (ONLY_MENTIONS === outer1_5.ALL_MESSAGES) {
let UNREADS_ONLY_MENTIONS = outer1_6.UNREADS_ALL_MESSAGES;
} else {
UNREADS_ONLY_MENTIONS = outer1_6.UNREADS_ONLY_MENTIONS;
}
obj = { flags: guildId(outer1_2[10]).withGuildUnreadFlags(guildFlags, UNREADS_ONLY_MENTIONS) };
const NotificationLabel = guildId(outer1_2[11]).NotificationLabel;
const result = obj.updateGuildNotificationSettings(guildId.guildId, obj, NotificationLabel.unreads(ONLY_MENTIONS));
}
});
2026-07-20 16:05:17 +00:00
};