Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
59 lines
2.4 KiB
TypeScript
59 lines
2.4 KiB
TypeScript
// Module ID: 9811
|
|
// Function ID: 9812
|
|
// Name: VoicePanelUtils
|
|
// Dependencies: [1957, 4659, 4844, 4845, 563, 2]
|
|
// Exports: isVoicePanelEnabled, useIsAnyVoicePanelOpen, useIsVoicePanelFullscreen, useIsVoicePanelMounted, useIsVoicePanelOpen, useIsVoicePanelShowing
|
|
|
|
// Module 9811 (VoicePanelUtils)
|
|
import useStateFromStores from "useStateFromStores" /* 563 */;
|
|
import StageVoicePanelExperiment from "StageVoicePanelExperiment" /* 4845 */;
|
|
import ChannelStore from "ChannelStore" /* 1957 */;
|
|
import RTCConnectionStore from "RTCConnectionStore" /* 4659 */;
|
|
import VoicePanelStore from "VoicePanelStore" /* 4844 */;
|
|
|
|
require = fn;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/voice_panel/VoicePanelUtils.native.tsx");
|
|
|
|
export const isVoicePanelEnabled = function isVoicePanelEnabled(channel2) {
|
|
const result = StageVoicePanelExperiment.isStageVoicePanelEnabled("voice_panel_utils");
|
|
let tmp2 = !result;
|
|
if (!result) {
|
|
let isGuildStageVoiceResult;
|
|
if (channel2 != null) {
|
|
isGuildStageVoiceResult = channel2.isGuildStageVoice();
|
|
}
|
|
tmp2 = isGuildStageVoiceResult;
|
|
}
|
|
return !tmp2;
|
|
};
|
|
export const useIsVoicePanelShowing = function useIsVoicePanelShowing() {
|
|
const items = [ChannelStore, RTCConnectionStore];
|
|
return useStateFromStores.useStateFromStores(items, () => {
|
|
channel = channel.getChannel(channelId.getChannelId());
|
|
let tmp = null != channel;
|
|
if (tmp) {
|
|
const isGuildStageVoiceResult = channel.isGuildStageVoice();
|
|
let result = !isGuildStageVoiceResult;
|
|
if (isGuildStageVoiceResult) {
|
|
result = StageVoicePanelExperiment.isStageVoicePanelEnabled("voice_panel_utils");
|
|
}
|
|
tmp = result;
|
|
}
|
|
return tmp;
|
|
});
|
|
};
|
|
export const useIsVoicePanelFullscreen = function useIsVoicePanelFullscreen() {
|
|
return VoicePanelStore((isVoicePanelFullscreen) => isVoicePanelFullscreen.isVoicePanelFullscreen());
|
|
};
|
|
export const useIsVoicePanelOpen = function useIsVoicePanelOpen(channelId) {
|
|
closure_0 = channelId;
|
|
return VoicePanelStore((isChannelOpen) => isChannelOpen.isChannelOpen(closure_0));
|
|
};
|
|
export const useIsAnyVoicePanelOpen = function useIsAnyVoicePanelOpen() {
|
|
return VoicePanelStore((isAnyVoicePanelOpen) => isAnyVoicePanelOpen.isAnyVoicePanelOpen());
|
|
};
|
|
export const useIsVoicePanelMounted = function useIsVoicePanelMounted(channelId) {
|
|
closure_0 = channelId;
|
|
return VoicePanelStore((isMounted) => isMounted.isMounted(closure_0));
|
|
};
|