diff --git a/ts/components/CallManager.stories.tsx b/ts/components/CallManager.stories.tsx index f6f53e2e89..2428bfad0b 100644 --- a/ts/components/CallManager.stories.tsx +++ b/ts/components/CallManager.stories.tsx @@ -70,7 +70,7 @@ const createProps = (storyProps: Partial = {}): PropsType => ({ fakeGetGroupCallVideoFrameSource(demuxId), getPreferredBadge: () => undefined, getPresentingSources: action('get-presenting-sources'), - hangUp: action('hang-up'), + hangUpActiveCall: action('hang-up-active-call'), i18n, isGroupCallOutboundRingEnabled: true, keyChangeOk: action('key-change-ok'), diff --git a/ts/components/CallManager.tsx b/ts/components/CallManager.tsx index cbe40b6383..73f371460d 100644 --- a/ts/components/CallManager.tsx +++ b/ts/components/CallManager.tsx @@ -31,7 +31,6 @@ import type { AcceptCallType, CancelCallType, DeclineCallType, - HangUpType, KeyChangeOkType, SetGroupCallVideoRequestType, SetLocalAudioType, @@ -97,7 +96,7 @@ export type PropsType = { setPresenting: (_?: PresentedSource) => void; setRendererCanvas: (_: SetRendererCanvasType) => void; stopRingtone: () => unknown; - hangUp: (_: HangUpType) => void; + hangUpActiveCall: () => void; theme: ThemeType; togglePip: () => void; toggleScreenRecordingPermissionsDialog: () => unknown; @@ -114,7 +113,7 @@ const ActiveCallManager: React.FC = ({ availableCameras, cancelCall, closeNeedPermissionScreen, - hangUp, + hangUpActiveCall, i18n, isGroupCallOutboundRingEnabled, keyChangeOk, @@ -270,7 +269,7 @@ const ActiveCallManager: React.FC = ({ = ({ getPresentingSources={getPresentingSources} getGroupCallVideoFrameSource={getGroupCallVideoFrameSourceForActiveCall} groupMembers={groupMembers} - hangUp={hangUp} + hangUpActiveCall={hangUpActiveCall} i18n={i18n} joinedAt={joinedAt} me={me} @@ -350,9 +349,7 @@ const ActiveCallManager: React.FC = ({ contacts={activeCall.conversationsWithSafetyNumberChanges} getPreferredBadge={getPreferredBadge} i18n={i18n} - onCancel={() => { - hangUp({ conversationId: activeCall.conversation.id }); - }} + onCancel={hangUpActiveCall} onConfirm={() => { keyChangeOk({ conversationId: activeCall.conversation.id }); }} diff --git a/ts/components/CallScreen.stories.tsx b/ts/components/CallScreen.stories.tsx index 37624fde50..9bc20dde5c 100644 --- a/ts/components/CallScreen.stories.tsx +++ b/ts/components/CallScreen.stories.tsx @@ -148,7 +148,7 @@ const createProps = ( activeCall: createActiveCallProp(overrideProps), getGroupCallVideoFrameSource: fakeGetGroupCallVideoFrameSource, getPresentingSources: action('get-presenting-sources'), - hangUp: action('hang-up'), + hangUpActiveCall: action('hang-up'), i18n, me: { color: AvatarColors[1], diff --git a/ts/components/CallScreen.tsx b/ts/components/CallScreen.tsx index 4c93669f37..fcb616c1e5 100644 --- a/ts/components/CallScreen.tsx +++ b/ts/components/CallScreen.tsx @@ -7,7 +7,6 @@ import { noop } from 'lodash'; import classNames from 'classnames'; import type { VideoFrameSource } from 'ringrtc'; import type { - HangUpType, SetLocalAudioType, SetLocalPreviewType, SetLocalVideoType, @@ -47,7 +46,7 @@ export type PropsType = { getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource; getPresentingSources: () => void; groupMembers?: Array>; - hangUp: (_: HangUpType) => void; + hangUpActiveCall: () => void; i18n: LocalizerType; joinedAt?: number; me: { @@ -115,7 +114,7 @@ export const CallScreen: React.FC = ({ getGroupCallVideoFrameSource, getPresentingSources, groupMembers, - hangUp, + hangUpActiveCall, i18n, joinedAt, me, @@ -510,9 +509,7 @@ export const CallScreen: React.FC = ({ i18n={i18n} onMouseEnter={onControlsMouseEnter} onMouseLeave={onControlsMouseLeave} - onClick={() => { - hangUp({ conversationId: conversation.id }); - }} + onClick={hangUpActiveCall} />
= {}): PropsType => ({ activeCall: overrideProps.activeCall || defaultCall, getGroupCallVideoFrameSource: fakeGetGroupCallVideoFrameSource, - hangUp: action('hang-up'), + hangUpActiveCall: action('hang-up-active-call'), hasLocalVideo: boolean('hasLocalVideo', overrideProps.hasLocalVideo || false), i18n, setGroupCallVideoRequest: action('set-group-call-video-request'), diff --git a/ts/components/CallingPip.tsx b/ts/components/CallingPip.tsx index 3fcf9316cf..976280f1ea 100644 --- a/ts/components/CallingPip.tsx +++ b/ts/components/CallingPip.tsx @@ -8,7 +8,6 @@ import { CallingPipRemoteVideo } from './CallingPipRemoteVideo'; import type { LocalizerType } from '../types/Util'; import type { ActiveCallType, GroupCallVideoRequest } from '../types/Calling'; import type { - HangUpType, SetLocalPreviewType, SetRendererCanvasType, } from '../state/ducks/calling'; @@ -52,7 +51,7 @@ type SnapCandidate = { export type PropsType = { activeCall: ActiveCallType; getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource; - hangUp: (_: HangUpType) => void; + hangUpActiveCall: () => void; hasLocalVideo: boolean; i18n: LocalizerType; setGroupCallVideoRequest: (_: Array) => void; @@ -70,7 +69,7 @@ const PIP_PADDING = 8; export const CallingPip = ({ activeCall, getGroupCallVideoFrameSource, - hangUp, + hangUpActiveCall, hasLocalVideo, i18n, setGroupCallVideoRequest, @@ -293,9 +292,7 @@ export const CallingPip = ({