decord/alpha/source/modules/voice_panel/VoicePanelManager.native.tsx

63 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 17595
// Function ID: 17596
// Name: VoicePanelManager
// Dependencies: [2044, 4852, 5037, 6534, 2]
2026-07-23 10:11:24 +00:00
// Module 17595 (VoicePanelManager)
import ChannelStore from "ChannelStore" /* 2044 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4852 */;
import VoicePanelStore from "VoicePanelStore" /* 5037 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 6534 */;
2026-07-20 16:05:17 +00:00
const prototype = function VoicePanelManager() {
2026-07-29 08:29:29 +00:00
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = {
VOICE_CHANNEL_SELECT() {
const channelId = RTCConnectionStore.getChannelId();
2026-07-29 08:29:29 +00:00
if (null != channelId) {
const state = VoicePanelStore.getState();
const channel = ChannelStore.getChannel(channelId);
let isGuildStageVoiceResult;
if (channel != null) {
isGuildStageVoiceResult = channel.isGuildStageVoice();
}
if (isGuildStageVoiceResult) {
state.closeChannel(channelId);
} else {
const channels = state.channels;
if (!channels.has(channelId)) {
state.openChannel(channelId);
}
2026-07-29 08:29:29 +00:00
}
}
},
RTC_CONNECTION_STATE() {
const channelId = RTCConnectionStore.getChannelId();
2026-07-29 08:29:29 +00:00
if (null != channelId) {
const state = VoicePanelStore.getState();
const channel = ChannelStore.getChannel(channelId);
let isGuildStageVoiceResult;
if (channel != null) {
isGuildStageVoiceResult = channel.isGuildStageVoice();
}
if (isGuildStageVoiceResult) {
state.closeChannel(channelId);
} else {
const channels = state.channels;
if (!channels.has(channelId)) {
state.openChannel(channelId);
}
2026-07-29 08:29:29 +00:00
}
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
2026-07-20 16:05:17 +00:00
}
const prototype1 = new prototype();
const size = fn(2);
const result = size.fileFinishedImporting("modules/voice_panel/VoicePanelManager.native.tsx");
2026-07-20 16:05:17 +00:00
export default prototype1;