Track acceptedTime during call, fix call screen duration

This commit is contained in:
Jamie Kyle 2023-09-20 07:00:01 -07:00 committed by GitHub
parent 95b0f67a47
commit bc67d421ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 92 additions and 64 deletions

View file

@ -14,7 +14,10 @@ import type { ConversationType } from '../ducks/conversations';
import { getIncomingCall } from '../selectors/calling';
import { isGroupCallOutboundRingEnabled } from '../../util/isGroupCallOutboundRingEnabled';
import type {
ActiveCallBaseType,
ActiveCallType,
ActiveDirectCallType,
ActiveGroupCallType,
GroupCallRemoteParticipantType,
} from '../../types/Calling';
import { isAciString } from '../../util/isAciString';
@ -138,7 +141,7 @@ const mapStateToActiveCallProp = (
return convoForAci ? conversationSelector(convoForAci.id) : undefined;
});
const baseResult = {
const baseResult: ActiveCallBaseType = {
conversation,
hasLocalAudio: activeCallState.hasLocalAudio,
hasLocalVideo: activeCallState.hasLocalVideo,
@ -185,7 +188,7 @@ const mapStateToActiveCallProp = (
serviceId: conversation.serviceId,
},
],
};
} satisfies ActiveDirectCallType;
case CallMode.Group: {
const conversationsWithSafetyNumberChanges: Array<ConversationType> = [];
const groupMembers: Array<ConversationType> = [];
@ -282,7 +285,7 @@ const mapStateToActiveCallProp = (
peekedParticipants,
remoteParticipants,
remoteAudioLevels: call.remoteAudioLevels || new Map<number, number>(),
};
} satisfies ActiveGroupCallType;
}
default:
throw missingCaseError(call);