Add copy option to triple-dot menu of messages
This commit is contained in:
parent
f1624705a7
commit
f004e714f0
9 changed files with 61 additions and 0 deletions
|
@ -720,6 +720,7 @@ export const getPropsForMessage = (
|
|||
storyReplyContext,
|
||||
textAttachment,
|
||||
payment,
|
||||
canCopy: canCopy(message),
|
||||
canEditMessage: canEditMessage(message),
|
||||
canDeleteForEveryone: canDeleteForEveryone(message),
|
||||
canDownload: canDownload(message, conversationSelector),
|
||||
|
@ -1773,6 +1774,12 @@ export function canReact(
|
|||
return canReplyOrReact(message, ourConversationId, conversation);
|
||||
}
|
||||
|
||||
export function canCopy(
|
||||
message: Pick<MessageWithUIFieldsType, 'body' | 'deletedForEveryone'>
|
||||
): boolean {
|
||||
return !message.deletedForEveryone && Boolean(message.body);
|
||||
}
|
||||
|
||||
export function canDeleteForEveryone(
|
||||
message: Pick<
|
||||
MessageWithUIFieldsType,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue