2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 10294
|
|
|
|
|
// Function ID: 10295
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: NotificationSettingsMessageUnreadGuildActionSheet
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [19, 4817, 1074, 4818, 1084, 21, 10283, 10295, 1114, 7222, 10278, 7217, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 10294 (NotificationSettingsMessageUnreadGuildActionSheet)
|
|
|
|
|
import NotificationSettingsModalActionCreatorsDefault from "NotificationSettingsModalActionCreators" /* 7222 */;
|
|
|
|
|
import notificationSettingsFlagUtils from "notificationSettingsFlagUtils" /* 10278 */;
|
|
|
|
|
import NotificationSettingsMessageUnreadActionSheetDefault from "NotificationSettingsMessageUnreadActionSheet" /* 10295 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4817 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const require = globalThis.__r;
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
const NotificationSettingsUtils = tmp3(7217);
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const UserNotificationSettings = fn(1074).UserNotificationSettings;
|
2026-09-12 13:45:10 +00:00
|
|
|
const UnreadSetting = fn(4818).UnreadSetting;
|
2026-09-10 05:38:07 +00:00
|
|
|
let closure_6 = fn(1084).GuildNotificationSettingsFlags;
|
|
|
|
|
const jsx = fn(21).jsx;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
let result = size.fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageUnreadGuildActionSheet.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function NotificationSettingsMessageUnreadGuildActionSheet(guildId) {
|
2026-09-10 05:38:07 +00:00
|
|
|
_require = guildId;
|
|
|
|
|
const guildPresetSettings = require("notificationSettingsGuildFlagUtils").useGuildPresetSettings(guildId.guildId);
|
2026-07-20 16:05:17 +00:00
|
|
|
({ unread, notification } = guildPresetSettings);
|
|
|
|
|
let stringResult;
|
2026-09-10 05:38:07 +00:00
|
|
|
let obj = require("notificationSettingsGuildFlagUtils");
|
|
|
|
|
const tmp4 = jsx;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (notification === UserNotificationSettings.ALL_MESSAGES) {
|
2026-09-05 10:56:28 +00:00
|
|
|
const intl = tmp(1114).intl;
|
|
|
|
|
stringResult = intl.string(tmp(1114).t.eP8yWU);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
return tmp4(NotificationSettingsMessageUnreadActionSheetDefault, {
|
2026-07-29 08:29:29 +00:00
|
|
|
disabledMentionOnlyWithReason: stringResult,
|
|
|
|
|
value: unread,
|
2026-09-10 05:38:07 +00:00
|
|
|
onChange(toggleExpandedHistory) {
|
|
|
|
|
const guildFlags = UserGuildSettingsStore.getGuildFlags(guildId.guildId);
|
|
|
|
|
const obj = NotificationSettingsModalActionCreatorsDefault;
|
|
|
|
|
if (toggleExpandedHistory === UnreadSetting.ALL_MESSAGES) {
|
|
|
|
|
let UNREADS_ONLY_MENTIONS = constants.UNREADS_ALL_MESSAGES;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
UNREADS_ONLY_MENTIONS = constants.UNREADS_ONLY_MENTIONS;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
const NotificationLabel = NotificationSettingsUtils.NotificationLabel;
|
|
|
|
|
const result = obj.updateGuildNotificationSettings(guildId.guildId, { flags: notificationSettingsFlagUtils.withGuildUnreadFlags(guildFlags, UNREADS_ONLY_MENTIONS) }, NotificationLabel.unreads(toggleExpandedHistory));
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
});
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|