mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 12:47:39 +00:00
Allow PiP while awaiting approval to join adhoc calls
This commit is contained in:
@@ -75,6 +75,7 @@ export type PropsType = {
|
||||
setOutgoingRing: (_: boolean) => void;
|
||||
showParticipantsList: boolean;
|
||||
toggleParticipants: () => void;
|
||||
togglePip: () => void;
|
||||
toggleSettings: () => void;
|
||||
};
|
||||
|
||||
@@ -98,6 +99,7 @@ export function CallingLobby({
|
||||
setLocalVideo,
|
||||
setOutgoingRing,
|
||||
toggleParticipants,
|
||||
togglePip,
|
||||
toggleSettings,
|
||||
outgoingRing,
|
||||
}: PropsType): JSX.Element {
|
||||
@@ -119,6 +121,10 @@ export function CallingLobby({
|
||||
setOutgoingRing(!outgoingRing);
|
||||
}, [outgoingRing, setOutgoingRing]);
|
||||
|
||||
const togglePipForCallingHeader = isAdhocJoinRequestPending
|
||||
? togglePip
|
||||
: undefined;
|
||||
|
||||
React.useEffect(() => {
|
||||
setLocalPreview({ element: localVideoRef });
|
||||
|
||||
@@ -155,7 +161,9 @@ export function CallingLobby({
|
||||
|
||||
const isOnline = useIsOnline();
|
||||
|
||||
const [isCallConnecting, setIsCallConnecting] = React.useState(false);
|
||||
const [isCallConnecting, setIsCallConnecting] = React.useState(
|
||||
isAdhocJoinRequestPending || false
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const videoButtonType = hasLocalVideo
|
||||
@@ -266,6 +274,7 @@ export function CallingLobby({
|
||||
i18n={i18n}
|
||||
isGroupCall={isGroupOrAdhocCall}
|
||||
participantCount={peekedParticipants.length}
|
||||
togglePip={togglePipForCallingHeader}
|
||||
toggleSettings={toggleSettings}
|
||||
onCancel={onCallCanceled}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user