Add contextMenu for deleting call events on right-click

This commit is contained in:
trevor-signal 2023-12-12 11:11:39 -05:00 committed by GitHub
parent 7fb01f102d
commit 88fd42a46b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 394 additions and 269 deletions

View file

@ -1328,6 +1328,8 @@ export type GetPropsForCallHistoryOptions = Pick<
| 'callHistorySelector'
| 'conversationSelector'
| 'ourConversationId'
| 'selectedMessageIds'
| 'targetedMessageId'
>;
const emptyCallNotification: CallingNotificationType = {
@ -1337,6 +1339,8 @@ const emptyCallNotification: CallingNotificationType = {
groupCallEnded: null,
maxDevices: Infinity,
deviceCount: 0,
isSelectMode: false,
isTargeted: false,
};
export function getPropsForCallHistory(
@ -1347,6 +1351,8 @@ export function getPropsForCallHistory(
activeCall,
conversationSelector,
ourConversationId,
selectedMessageIds,
targetedMessageId,
}: GetPropsForCallHistoryOptions
): CallingNotificationType {
const { callId } = message;
@ -1368,6 +1374,8 @@ export function getPropsForCallHistory(
'getPropsForCallHistory: Missing conversation'
);
const isSelectMode = selectedMessageIds != null;
let callCreator: ConversationType | null = null;
if (callHistory.ringerId) {
callCreator = conversationSelector(callHistory.ringerId);
@ -1383,6 +1391,8 @@ export function getPropsForCallHistory(
groupCallEnded: false,
deviceCount: 0,
maxDevices: Infinity,
isSelectMode,
isTargeted: message.id === targetedMessageId,
};
}
@ -1410,6 +1420,8 @@ export function getPropsForCallHistory(
groupCallEnded: callId !== conversationCallId || deviceCount === 0,
deviceCount,
maxDevices,
isSelectMode,
isTargeted: message.id === targetedMessageId,
};
}