Files
discord-decomp/modules/video_calls/native/components/SingleVideoCall.tsx
T
2026-11-01 12:12:55 +02:00

31 lines
1.5 KiB
TypeScript

// Metro module 10820 (f10821).
import { useMemo } from "react";
import { resetFocus, toggleFocus } from "../ChannelCallStore";
import useSafeAreaInsets_native from "../../../safe_area/useSafeAreaInsets.native";
import useAnalyticsLocations from "../../../app_analytics/useAnalyticsLocations";
import UserTile from "./UserTile";
import { AvatarSizes } from "../../../../design/void/native";
import { ResizeMode } from "./VideoRenderer";
import ChannelRTCActionCreators from "../../../../actions/ChannelRTCActionCreators";
import showUserProfileActionSheet from "../../../user_profile/native/showUserProfileActionSheet";
export default function SingleVideoCall(props) {
const { participant, channel } = props;
const safeAreaInsets_native = useSafeAreaInsets_native();
const { bottom, right } = safeAreaInsets_native;
const analyticsLocations = useAnalyticsLocations().analyticsLocations;
return <UserTile gestureEnabled participant={participant} avatarSize={AvatarSizes.PROFILE} resizeMode={ResizeMode.AUTO} statusStyle={useMemo(() => ({
marginRight: right,
marginBottom: bottom
}), [right, bottom])} onSingleTap={toggleFocus} onDoubleTap={function onDoubleTap() {
resetFocus();
ChannelRTCActionCreators.selectParticipant(channel.id, null);
}} onLongPress={function onLongPress(event) {
showUserProfileActionSheet({
userId: event.user.id,
channelId: channel.id,
isVoiceContext: true,
sourceAnalyticsLocations: analyticsLocations
});
}} />;
};