decord/source/modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

33 lines
1.2 KiB
TypeScript

// Module ID: 13002
// Function ID: 13003
// Name: maybeOpenSpoilerGateForVoiceChannel
// Dependencies: [1957, 21, 7381, 4951, 13003, 2]
// Exports: maybeOpenSpoilerGateForVoiceChannel
// Module 13002 (maybeOpenSpoilerGateForVoiceChannel)
import useAlertStore from "useAlertStore" /* 4951 */;
import SpoilerChannelUtils from "SpoilerChannelUtils" /* 7381 */;
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 13003 */;
import ChannelStore from "ChannelStore" /* 1957 */;
const VoicePanelSpoilerAlertDefault = VoicePanelSpoilerAlert;
require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx");
export const maybeOpenSpoilerGateForVoiceChannel = function maybeOpenSpoilerGateForVoiceChannel(id) {
const channel = ChannelStore.getChannel(id);
let tmp2 = null == channel;
if (!tmp2) {
tmp2 = !SpoilerChannelUtils.shouldShowSpoilerGateForChannelId(id);
}
let flag = !tmp2;
if (!tmp2) {
const obj3 = { channelId: channel.id };
useAlertStore.openAlert(VoicePanelSpoilerAlert.VOICE_PANEL_SPOILER_KEY, jsx(VoicePanelSpoilerAlertDefault, { channelId: channel.id }));
flag = true;
}
return flag;
};