decord/source/modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx

34 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 13027
// Function ID: 13028
2026-07-20 16:05:17 +00:00
// Name: maybeOpenSpoilerGateForVoiceChannel
// Dependencies: [1957, 21, 7403, 4953, 13028, 2]
2026-07-20 16:05:17 +00:00
// Exports: maybeOpenSpoilerGateForVoiceChannel
// Module 13027 (maybeOpenSpoilerGateForVoiceChannel)
import useAlertStore from "useAlertStore" /* 4953 */;
import SpoilerChannelUtils from "SpoilerChannelUtils" /* 7403 */;
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 13028 */;
import ChannelStore from "ChannelStore" /* 1957 */;
2026-07-20 16:05:17 +00:00
const VoicePanelSpoilerAlertDefault = VoicePanelSpoilerAlert;
require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx");
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export const maybeOpenSpoilerGateForVoiceChannel = function maybeOpenSpoilerGateForVoiceChannel(id) {
const channel = ChannelStore.getChannel(id);
2026-07-20 16:05:17 +00:00
let tmp2 = null == channel;
if (!tmp2) {
tmp2 = !SpoilerChannelUtils.shouldShowSpoilerGateForChannelId(id);
2026-07-20 16:05:17 +00:00
}
let flag = !tmp2;
if (!tmp2) {
const obj3 = { channelId: channel.id };
useAlertStore.openAlert(VoicePanelSpoilerAlert.VOICE_PANEL_SPOILER_KEY, jsx(VoicePanelSpoilerAlertDefault, { channelId: channel.id }));
2026-07-20 16:05:17 +00:00
flag = true;
}
return flag;
};