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

46 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-13 07:00:46 +00:00
// Module ID: 9894
// Function ID: 9895
2026-07-20 16:05:17 +00:00
// Name: NotificationSettingsMessageUnreadChannelActionSheet
2026-08-13 07:00:46 +00:00
// Dependencies: [19, 4540, 676, 4541, 685, 21, 9875, 9893, 1236, 5302, 9876, 5297, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-13 07:00:46 +00:00
// Module 9894 (NotificationSettingsMessageUnreadChannelActionSheet)
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 { ChannelNotificationSettingsFlags as closure_6 } from "MAX_FAVORITES";
import { jsx } from "jsxProd";
const require = arg1;
let result = require("ME").fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageUnreadChannelActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function NotificationSettingsMessageUnreadChannelActionSheet(channel) {
let notification;
let unread;
2026-07-23 10:11:24 +00:00
const _require = channel;
2026-08-13 07:00:46 +00:00
let obj = _require(9875);
2026-07-20 16:05:17 +00:00
const channelPresetSettings = obj.useChannelPresetSettings(channel.channel);
({ unread, notification } = channelPresetSettings);
2026-07-29 08:29:29 +00:00
obj = { value: unread, disabledMentionOnlyWithReason: null, onChange: null };
2026-07-20 16:05:17 +00:00
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[1] = stringResult;
obj[2] = function onChange(ONLY_MENTIONS) {
2026-07-23 10:11:24 +00:00
const channelIdFlags = outer1_3.getChannelIdFlags(channel.channel.guild_id, channel.channel.id);
let obj = outer1_1(outer1_2[9]);
if (ONLY_MENTIONS === outer1_5.ALL_MESSAGES) {
let UNREADS_ONLY_MENTIONS = outer1_6.UNREADS_ALL_MESSAGES;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
UNREADS_ONLY_MENTIONS = outer1_6.UNREADS_ONLY_MENTIONS;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { flags: channel(outer1_2[10]).withChannelUnreadFlags(channelIdFlags, UNREADS_ONLY_MENTIONS) };
2026-07-23 10:11:24 +00:00
const NotificationLabel = channel(outer1_2[11]).NotificationLabel;
const result = obj.updateChannelOverrideSettings(channel.channel.guild_id, channel.channel.id, obj, NotificationLabel.unreads(ONLY_MENTIONS));
2026-07-20 16:05:17 +00:00
};
2026-08-13 07:00:46 +00:00
return jsx(importDefault(9893), { value: unread, disabledMentionOnlyWithReason: null, onChange: null });
2026-07-20 16:05:17 +00:00
};