2026-09-10 19:12:31 +00:00
|
|
|
// Module ID: 13002
|
|
|
|
|
// Function ID: 13003
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: maybeOpenSpoilerGateForVoiceChannel
|
2026-09-10 19:12:31 +00:00
|
|
|
// Dependencies: [1957, 21, 7381, 4951, 13003, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: maybeOpenSpoilerGateForVoiceChannel
|
|
|
|
|
|
2026-09-10 19:12:31 +00:00
|
|
|
// Module 13002 (maybeOpenSpoilerGateForVoiceChannel)
|
|
|
|
|
import useAlertStore from "useAlertStore" /* 4951 */;
|
|
|
|
|
import SpoilerChannelUtils from "SpoilerChannelUtils" /* 7381 */;
|
|
|
|
|
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 13003 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 1957 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +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) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const channel = ChannelStore.getChannel(id);
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp2 = null == channel;
|
|
|
|
|
if (!tmp2) {
|
2026-09-10 05:38:07 +00:00
|
|
|
tmp2 = !SpoilerChannelUtils.shouldShowSpoilerGateForChannelId(id);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
let flag = !tmp2;
|
|
|
|
|
if (!tmp2) {
|
2026-09-10 05:38:07 +00:00
|
|
|
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;
|
|
|
|
|
};
|