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

49 lines
2.3 KiB
TypeScript
Raw Normal View History

// Module ID: 10091
// Function ID: 10092
2026-07-20 16:05:17 +00:00
// Name: NotificationSettingsMessageNotificationChannelActionSheet
// Dependencies: [19, 4709, 673, 4710, 682, 21, 10078, 10090, 1233, 10079, 7059, 7054, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 10091 (NotificationSettingsMessageNotificationChannelActionSheet)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import closure_3 from "updateUserGuildSettingsInternal" /* 4709 */;
2026-09-02 09:53:35 +00:00
import { UserNotificationSettings } from "ME" /* 673 */;
import { UnreadSetting } from "ReadStateTypes" /* 4710 */;
2026-09-02 09:53:35 +00:00
import { ChannelNotificationSettingsFlags as closure_6 } from "MAX_FAVORITES" /* 682 */;
2026-08-24 06:08:38 +00:00
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/NotificationSettingsMessageNotificationChannelActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function NotificationSettingsMessageNotificationChannelActionSheet(channel) {
2026-07-23 10:11:24 +00:00
const _require = channel;
let obj = _require(10078);
2026-07-20 16:05:17 +00:00
const channelPresetSettings = obj.useChannelPresetSettings(channel.channel);
const unread = channelPresetSettings.unread;
const notification = channelPresetSettings.notification;
2026-07-29 08:29:29 +00:00
obj = { context: "channel", 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-09-02 09:53:35 +00:00
const intl = tmp(1233).intl;
stringResult = intl.string(tmp(1233).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 = channel(closure_1_2[9]).withChannelUnreadFlags(closure_1_3.getChannelIdFlags(channel.channel.guild_id, channel.channel.id), closure_1_6.UNREADS_ALL_MESSAGES);
const obj2 = channel(closure_1_2[9]);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const NotificationLabel = channel(closure_1_2[11]).NotificationLabel;
const result = unread(closure_1_2[10]).updateChannelOverrideSettings(channel.channel.guild_id, channel.channel.id, obj, NotificationLabel.notifications(message_notifications));
2026-07-20 16:05:17 +00:00
};
return jsx(unread(10090), { context: "channel", value: notification, allMessagesSubLabel: null, onChange: null });
2026-07-20 16:05:17 +00:00
};