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

34 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 13068
// Function ID: 13069
2026-07-20 16:05:17 +00:00
// Name: maybeOpenSpoilerGateForVoiceChannel
// Dependencies: [1958, 21, 7436, 4985, 13069, 2]
2026-07-20 16:05:17 +00:00
// Exports: maybeOpenSpoilerGateForVoiceChannel
// Module 13068 (maybeOpenSpoilerGateForVoiceChannel)
import useAlertStore from "useAlertStore" /* 4985 */;
import SpoilerChannelUtils from "SpoilerChannelUtils" /* 7436 */;
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 13069 */;
import ChannelStore from "ChannelStore" /* 1958 */;
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;
};