decord/source/modules/voice_panel/VoicePanelUtils.native.tsx

58 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 10635
// Function ID: 10636
2026-07-20 16:05:17 +00:00
// Name: isVoicePanelEnabled
2026-08-05 07:35:12 +00:00
// Dependencies: [1372, 4326, 4465, 4466, 647, 2]
2026-07-20 16:05:17 +00:00
// Exports: isVoicePanelEnabled, useIsAnyVoicePanelOpen, useIsVoicePanelFullscreen, useIsVoicePanelMounted, useIsVoicePanelOpen, useIsVoicePanelShowing
2026-08-05 07:35:12 +00:00
// Module 10635 (isVoicePanelEnabled)
2026-07-29 08:29:29 +00:00
import ensureGuildLoaded from "ensureGuildLoaded";
import createRTCConnection from "createRTCConnection";
2026-07-23 10:11:24 +00:00
import withEqualityFn from "withEqualityFn";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
let result = require("withEqualityFn").fileFinishedImporting("modules/voice_panel/VoicePanelUtils.native.tsx");
2026-07-20 16:05:17 +00:00
export const isVoicePanelEnabled = function isVoicePanelEnabled(channel2) {
2026-08-05 07:35:12 +00:00
const result = require(4466) /* useIsStageVoicePanelEnabled */.isStageVoicePanelEnabled("voice_panel_utils");
2026-07-29 08:29:29 +00:00
let tmp2 = !result;
if (!result) {
2026-07-20 16:05:17 +00:00
let isGuildStageVoiceResult;
2026-07-29 08:29:29 +00:00
if (channel2 != null) {
2026-07-20 16:05:17 +00:00
isGuildStageVoiceResult = channel2.isGuildStageVoice();
}
2026-07-29 08:29:29 +00:00
tmp2 = isGuildStageVoiceResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return !tmp2;
2026-07-20 16:05:17 +00:00
};
export const useIsVoicePanelShowing = function useIsVoicePanelShowing() {
2026-07-29 08:29:29 +00:00
const items = [ensureGuildLoaded, createRTCConnection];
return require(647) /* defaultAreStatesEqual */.useStateFromStores(items, () => {
channel = channel.getChannel(channelId.getChannelId());
2026-07-20 16:05:17 +00:00
let tmp = null != channel;
if (tmp) {
2026-07-29 08:29:29 +00:00
const isGuildStageVoiceResult = channel.isGuildStageVoice();
let result = !isGuildStageVoiceResult;
if (isGuildStageVoiceResult) {
result = callback(table[3]).isStageVoicePanelEnabled("voice_panel_utils");
const obj2 = callback(table[3]);
2026-07-20 16:05:17 +00:00
}
tmp = result;
}
return tmp;
});
};
export const useIsVoicePanelFullscreen = function useIsVoicePanelFullscreen() {
return callback((isVoicePanelFullscreen) => isVoicePanelFullscreen.isVoicePanelFullscreen());
};
export const useIsVoicePanelOpen = function useIsVoicePanelOpen(channelId) {
2026-07-23 10:11:24 +00:00
let closure_0 = channelId;
return callback((isChannelOpen) => isChannelOpen.isChannelOpen(closure_0));
2026-07-20 16:05:17 +00:00
};
export const useIsAnyVoicePanelOpen = function useIsAnyVoicePanelOpen() {
return callback((isAnyVoicePanelOpen) => isAnyVoicePanelOpen.isAnyVoicePanelOpen());
};
export const useIsVoicePanelMounted = function useIsVoicePanelMounted(channelId) {
2026-07-23 10:11:24 +00:00
let closure_0 = channelId;
return callback((isMounted) => isMounted.isMounted(closure_0));
2026-07-20 16:05:17 +00:00
};