Show 'join anyway' in verify dialog when joining call

This commit is contained in:
Scott Nonnenberg 2023-09-05 17:34:51 -07:00 committed by GitHub
parent b6ed789197
commit 507986db92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 85 additions and 46 deletions

View file

@ -26,11 +26,9 @@ import {
} from '../../types/CallDisposition';
export type PropsActionsType = {
onOutgoingAudioCallInConversation: (conversationId: string) => void;
onOutgoingVideoCallInConversation: (conversationId: string) => void;
returnToActiveCall: () => void;
startCallingLobby: (_: {
conversationId: string;
isVideoCall: boolean;
}) => void;
};
type PropsHousekeeping = {
@ -86,8 +84,9 @@ function renderCallingNotificationButton(
conversationId,
i18n,
isNextItemCallingNotification,
onOutgoingAudioCallInConversation,
onOutgoingVideoCallInConversation,
returnToActiveCall,
startCallingLobby,
} = props;
if (isNextItemCallingNotification) {
@ -114,10 +113,11 @@ function renderCallingNotificationButton(
onClick = noop;
} else {
onClick = () => {
startCallingLobby({
conversationId,
isVideoCall: type === CallType.Video,
});
if (type === CallType.Video) {
onOutgoingVideoCallInConversation(conversationId);
} else {
onOutgoingAudioCallInConversation(conversationId);
}
};
}
break;
@ -147,7 +147,7 @@ function renderCallingNotificationButton(
} else {
buttonText = i18n('icu:calling__join');
onClick = () => {
startCallingLobby({ conversationId, isVideoCall: true });
onOutgoingVideoCallInConversation(conversationId);
};
}
break;