mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Refactor screen share picker internals
This commit is contained in:
@@ -29,7 +29,6 @@ import type {
|
||||
ActiveCallReactionsType,
|
||||
ConversationsByDemuxIdType,
|
||||
GroupCallVideoRequest,
|
||||
PresentedSource,
|
||||
} from '../types/Calling';
|
||||
import {
|
||||
CALLING_REACTIONS_LIFETIME,
|
||||
@@ -97,6 +96,7 @@ export type PropsType = {
|
||||
activeCall: ActiveCallType;
|
||||
approveUser: (payload: PendingUserActionPayloadType) => void;
|
||||
batchUserAction: (payload: BatchUserActionPayloadType) => void;
|
||||
cancelPresenting: () => void;
|
||||
denyUser: (payload: PendingUserActionPayloadType) => void;
|
||||
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
|
||||
getPresentingSources: () => void;
|
||||
@@ -120,7 +120,6 @@ export type PropsType = {
|
||||
setLocalAudio: (_: SetLocalAudioType) => void;
|
||||
setLocalVideo: (_: SetLocalVideoType) => void;
|
||||
setLocalPreview: (_: SetLocalPreviewType) => void;
|
||||
setPresenting: (_?: PresentedSource) => void;
|
||||
setRendererCanvas: (_: SetRendererCanvasType) => void;
|
||||
stickyControls: boolean;
|
||||
switchToPresentationView: () => void;
|
||||
@@ -190,6 +189,7 @@ export function CallScreen({
|
||||
activeCall,
|
||||
approveUser,
|
||||
batchUserAction,
|
||||
cancelPresenting,
|
||||
changeCallView,
|
||||
denyUser,
|
||||
getGroupCallVideoFrameSource,
|
||||
@@ -210,7 +210,6 @@ export function CallScreen({
|
||||
setLocalAudio,
|
||||
setLocalVideo,
|
||||
setLocalPreview,
|
||||
setPresenting,
|
||||
setRendererCanvas,
|
||||
stickyControls,
|
||||
switchToPresentationView,
|
||||
@@ -260,11 +259,11 @@ export function CallScreen({
|
||||
|
||||
const togglePresenting = useCallback(() => {
|
||||
if (presentingSource) {
|
||||
setPresenting();
|
||||
cancelPresenting();
|
||||
} else {
|
||||
getPresentingSources();
|
||||
}
|
||||
}, [getPresentingSources, presentingSource, setPresenting]);
|
||||
}, [getPresentingSources, presentingSource, cancelPresenting]);
|
||||
|
||||
const hangUp = useCallback(() => {
|
||||
hangUpActiveCall('button click');
|
||||
|
||||
Reference in New Issue
Block a user