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

68 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 10665
// Function ID: 82913
2026-07-20 16:05:17 +00:00
// Name: isVoicePanelEnabled
2026-07-28 08:39:19 +00:00
// Dependencies: [1348, 4237, 4377, 4378, 624, 2]
2026-07-20 16:05:17 +00:00
// Exports: isVoicePanelEnabled, useIsAnyVoicePanelOpen, useIsVoicePanelFullscreen, useIsVoicePanelMounted, useIsVoicePanelOpen, useIsVoicePanelShowing
2026-07-28 08:39:19 +00:00
// Module 10665 (isVoicePanelEnabled)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_3 from "_isNativeReflectConstruct";
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-07-28 08:39:19 +00:00
let tmp = !require(4378) /* useIsStageVoicePanelEnabled */.isStageVoicePanelEnabled("voice_panel_utils");
2026-07-20 16:05:17 +00:00
if (tmp) {
let isGuildStageVoiceResult;
if (null != channel2) {
isGuildStageVoiceResult = channel2.isGuildStageVoice();
}
tmp = null != isGuildStageVoiceResult;
const tmp2 = isGuildStageVoiceResult;
}
if (tmp) {
tmp = tmp2;
}
return !tmp;
};
export const useIsVoicePanelShowing = function useIsVoicePanelShowing() {
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct, closure_3];
return require(624) /* defaultAreStatesEqual */.useStateFromStores(items, () => {
let obj = outer1_2;
let obj2 = outer1_3;
if (outer1_2 === undefined) {
obj = outer1_2;
2026-07-20 16:05:17 +00:00
}
if (obj2 === undefined) {
2026-07-23 10:11:24 +00:00
obj2 = outer1_3;
2026-07-20 16:05:17 +00:00
}
const channel = obj.getChannel(obj2.getChannelId());
let tmp = null != channel;
if (tmp) {
let result = !channel.isGuildStageVoice();
if (!result) {
2026-07-23 10:11:24 +00:00
result = outer1_0(outer1_1[3]).isStageVoicePanelEnabled("voice_panel_utils");
const obj4 = outer1_0(outer1_1[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
};