This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,15 @@
// Metro module 10461 (f10462).
import UserGuildSettingsStore from "../../../../stores/UserGuildSettingsStore";
import { AnalyticsObjects } from "../../../../Constants";
import { UnreadSetting } from "../../../read_states/ReadStateConstants";
import { ChannelNotificationSettingsFlags } from "../../../user_settings/UserSettingsConstants";
import NotificationSettingsModalActionCreators from "../../../../actions/NotificationSettingsModalActionCreators";
import { withChannelUnreadFlags } from "../../settings/utils/notificationSettingsFlagUtils";
import { NotificationLabel } from "../../../../utils/NotificationSettingsUtils";
export default function updateChannelUnreadSettings(a0, a1, a2) {
NotificationSettingsModalActionCreators.updateChannelOverrideSettings(a0, a1, {
flags: withChannelUnreadFlags(UserGuildSettingsStore.getChannelIdFlags(a0, a1), a2)
}, NotificationLabel.unreads(a2 === ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES ? UnreadSetting.ALL_MESSAGES : UnreadSetting.ONLY_MENTIONS), {
object: AnalyticsObjects.NOTIFICATION_SETTING_UNREAD_NOTICE
});
};
@@ -0,0 +1,22 @@
// Metro module 10455 (f10456).
import { useState, useEffect, useCallback } from "react";
import { CHANNEL_ELIGIBLE_FOR_UNREAD_SETTING } from "../../../../records/ChannelRecord";
import { useShouldUseNewNotificationSystem } from "../../NotificationUtils";
import { useStateFromStores } from "../../../../_bundle/Module589";
import UnreadSettingNoticeStore2 from "../UnreadSettingNoticeStore2";
export default function useUnreadSettingNotice(a0) {
const shouldUseNewNotificationSystem = useShouldUseNewNotificationSystem("useShouldRenderBanner");
const [state, setState] = useState("");
useEffect(() => {
setState("");
}, [a0.id]);
useEffect(() => {
if (CHANNEL_ELIGIBLE_FOR_UNREAD_SETTING.has(a0.type) && state !== a0.id && shouldUseNewNotificationSystem && UnreadSettingNoticeStore2.maybeAutoUpgradeChannel(a0.id)) {
setState(a0.id);
}
}, [state, shouldUseNewNotificationSystem, useStateFromStores([UnreadSettingNoticeStore2], () => UnreadSettingNoticeStore2.getLastActionTime(a0.id)), a0]);
return {
showUnreadsNotice: state === a0.id,
clearUnreadsNotice: useCallback(() => setState(""), [])
};
};