2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 10278
|
|
|
|
|
// Function ID: 10279
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: notificationSettingsFlagUtils
|
2026-09-05 10:56:28 +00:00
|
|
|
// Dependencies: [1084, 1384, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: resetChannelUnreadFlags, resetGuildUnreadFlags, withChannelUnreadFlags, withGuildUnreadFlags
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 10278 (notificationSettingsFlagUtils)
|
2026-09-10 05:38:07 +00:00
|
|
|
import FlagUtilsAll from "FlagUtils" /* 1384 */;
|
|
|
|
|
import UserSettingsConstants from "UserSettingsConstants" /* 1084 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
({ GuildNotificationSettingsFlags: c2, ChannelNotificationSettingsFlags: c3 } = UserSettingsConstants);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/notifications/settings/utils/notificationSettingsFlagUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
export const resetGuildUnreadFlags = function resetGuildUnreadFlags(setting) {
|
2026-09-10 05:38:07 +00:00
|
|
|
return FlagUtilsAll.removeFlags(setting, constants.UNREADS_ALL_MESSAGES, constants.UNREADS_ONLY_MENTIONS);
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export const withGuildUnreadFlags = function withGuildUnreadFlags(guildFlags, UNREADS_ONLY_MENTIONS) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = FlagUtilsAll;
|
|
|
|
|
return obj.addFlag(FlagUtilsAll.removeFlags(guildFlags, constants.UNREADS_ALL_MESSAGES, constants.UNREADS_ONLY_MENTIONS), UNREADS_ONLY_MENTIONS);
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
|
|
|
|
export const resetChannelUnreadFlags = function resetChannelUnreadFlags(channelIdFlags) {
|
2026-09-10 05:38:07 +00:00
|
|
|
return FlagUtilsAll.removeFlags(channelIdFlags, constants2.UNREADS_ALL_MESSAGES, constants2.UNREADS_ONLY_MENTIONS);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const withChannelUnreadFlags = function withChannelUnreadFlags(channelIdFlags, UNREADS_ONLY_MENTIONS) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = FlagUtilsAll;
|
|
|
|
|
return obj.addFlag(FlagUtilsAll.removeFlags(channelIdFlags, constants2.UNREADS_ALL_MESSAGES, constants2.UNREADS_ONLY_MENTIONS), UNREADS_ONLY_MENTIONS);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|