Skip to content

Commit

Permalink
fix: Do not display copy option for ephemeral messages #WPB-6678 (#3499)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-zagorski authored Oct 15, 2024
1 parent 7c93aad commit f3afa5b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,16 @@ fun MessageOptionsModalSheetLayout(
val isUploading = message.isPending
val isDeleted = message.isDeleted
val isMyMessage = message.isMyMessage
val isEphemeral = message.header.messageStatus.expirationStatus is ExpirationStatus.Expirable
WireMenuModalSheetContent(
header = MenuModalSheetHeader.Gone,
menuItems = messageOptionsMenuItems(
isAssetMessage = message.isAssetMessage,
isUploading = message.isPending,
isComposite = message.messageContent is UIMessageContent.Composite,
isEphemeral = message.header.messageStatus.expirationStatus is ExpirationStatus.Expirable,
isEphemeral = isEphemeral,
isEditable = !isUploading && !isDeleted && message.messageContent is UIMessageContent.TextMessage && isMyMessage,
isCopyable = !isUploading && !isDeleted && message.messageContent is Copyable,
isCopyable = !isUploading && !isDeleted && !isEphemeral && message.messageContent is Copyable,
isOpenable = true,
onCopyClick = remember(message.messageContent) {
(message.messageContent as? Copyable)?.textToCopy(context.resources)?.let {
Expand Down

0 comments on commit f3afa5b

Please sign in to comment.