This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,32 @@
// Metro module 16020 (f16021).
import { useCallback, useMemo } from "react";
import ChannelStore from "../../../../stores/ChannelStore";
import useIsConnectedToVoiceChannel from "./useIsConnectedToVoiceChannel";
import { useIsDismissibleContentDismissed_UNSAFE } from "../../../dismissible_content/DismissibleContentUnsafeUtils";
import { DismissibleContent } from "../../../../_bundle/Module1358";
import { showSoundboardSoundPickerActionSheet } from "../../../soundboard/native/SoundboardActionCreators";
import canChannelUseSoundboard from "../../../soundboard/canChannelUseSoundboard";
let c11487_5 = {
VOICE_CONTROLS: "call control drawer",
VOICE_PANEL_CONTROLS: "voice panel controls"
};
export default function useSoundboardConfig(a0, a1) {
const analyticsSource = a1;
const isConnectedToVoiceChannel = useIsConnectedToVoiceChannel(a0);
const showIndicator = !useIsDismissibleContentDismissed_UNSAFE(DismissibleContent.SOUNDBOARD_MOBILE_NEW_BADGE);
return {
visible: isConnectedToVoiceChannel && (c11487_5.VOICE_CONTROLS !== a1 ? c11487_5.VOICE_PANEL_CONTROLS === a1 ? true : false : true),
handlePress: useCallback(() => {
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
showSoundboardSoundPickerActionSheet({
channel,
analyticsSource
});
}
}, [a0, a1]),
disabled: useMemo(() => !canChannelUseSoundboard(ChannelStore.getChannel(a0)), [a0]),
showIndicator
};
};
export { c11487_5 as SoundboardButtonLocation };