File tree Expand file tree Collapse file tree
app/src/main/java/com/nextcloud/talk/ui/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88package com.nextcloud.talk.ui.chat
99
1010import android.util.Log
11- import androidx.compose.foundation.clickable
11+ import androidx.compose.foundation.combinedClickable
1212import androidx.compose.foundation.layout.Box
1313import androidx.compose.foundation.layout.Column
1414import androidx.compose.foundation.layout.aspectRatio
@@ -150,6 +150,7 @@ fun MediaMessage(
150150 val fallbackPainter = painterResource(typeContent.drawableResourceId)
151151
152152 Box (modifier = Modifier .fillMaxWidth()) {
153+ val messageLongClickHandler = LocalMessageLongClickHandler .current
153154 AsyncImage (
154155 model = loadedImage,
155156 contentDescription = stringResource(R .string.media_message_content_description),
@@ -161,7 +162,10 @@ fun MediaMessage(
161162 .then(if (aspectRatio != null ) Modifier .aspectRatio(aspectRatio) else Modifier )
162163 .padding(mediaInset)
163164 .clip(mediaShape)
164- .clickable { onImageClick(message.id) },
165+ .combinedClickable(
166+ onClick = { onImageClick(message.id) },
167+ onLongClick = { messageLongClickHandler(message.id) }
168+ ),
165169 contentScale = ContentScale .FillWidth ,
166170 onError = { state ->
167171 val cause = state.result.throwable
You can’t perform that action at this time.
0 commit comments