Call Disposition
This commit is contained in:
parent
9927b132b9
commit
e5638c0b20
20 changed files with 445 additions and 53 deletions
|
@ -224,8 +224,10 @@ export function IncomingCallBar(props: PropsType): JSX.Element | null {
|
|||
}, [bounceAppIconStart, bounceAppIconStop]);
|
||||
|
||||
const acceptVideoCall = useCallback(() => {
|
||||
acceptCall({ conversationId, asVideoCall: true });
|
||||
}, [acceptCall, conversationId]);
|
||||
if (isVideoCall) {
|
||||
acceptCall({ conversationId, asVideoCall: true });
|
||||
}
|
||||
}, [isVideoCall, acceptCall, conversationId]);
|
||||
|
||||
const acceptAudioCall = useCallback(() => {
|
||||
acceptCall({ conversationId, asVideoCall: false });
|
||||
|
|
|
@ -205,11 +205,11 @@ const CALLING_SHORTCUTS: Array<ShortcutType> = [
|
|||
keys: [['shift', 'V']],
|
||||
},
|
||||
{
|
||||
description: 'Keyboard--accept-video-call',
|
||||
description: 'icu:Keyboard--accept-video-call',
|
||||
keys: [['ctrlOrAlt', 'shift', 'V']],
|
||||
},
|
||||
{
|
||||
description: 'Keyboard--accept-audio-call',
|
||||
description: 'icu:Keyboard--accept-call-without-video',
|
||||
keys: [['ctrlOrAlt', 'shift', 'A']],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@ import {
|
|||
import { missingCaseError } from '../../util/missingCaseError';
|
||||
import { Tooltip, TooltipPlacement } from '../Tooltip';
|
||||
import * as log from '../../logging/log';
|
||||
import { assertDev } from '../../util/assert';
|
||||
|
||||
export type PropsActionsType = {
|
||||
returnToActiveCall: () => void;
|
||||
|
@ -42,11 +43,14 @@ export const CallingNotification: React.FC<PropsType> = React.memo(
|
|||
let timestamp: number;
|
||||
let wasMissed = false;
|
||||
switch (props.callMode) {
|
||||
case CallMode.Direct:
|
||||
timestamp = props.acceptedTime || props.endedTime;
|
||||
case CallMode.Direct: {
|
||||
const resolvedTime = props.acceptedTime ?? props.endedTime;
|
||||
assertDev(resolvedTime, 'Direct call must have accepted or ended time');
|
||||
timestamp = resolvedTime;
|
||||
wasMissed =
|
||||
props.wasIncoming && !props.acceptedTime && !props.wasDeclined;
|
||||
break;
|
||||
}
|
||||
case CallMode.Group:
|
||||
timestamp = props.startedTime;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue