We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c077f9 commit c8135efCopy full SHA for c8135ef
1 file changed
app/src/main/java/com/nextcloud/talk/ui/chat/MediaMessage.kt
@@ -46,7 +46,13 @@ fun MediaMessage(
46
conversationThreadId: Long? = null,
47
onImageClick: (Int) -> Unit
48
) {
49
- val captionText = message.message.takeUnless { it == FILE_PLACEHOLDER_MESSAGE }
+ val hasExplicitCaption = message.plainMessage != FILE_PLACEHOLDER_MESSAGE
50
+ val hasPreview = !typeContent.previewUrl.isNullOrEmpty()
51
+ val captionText = when {
52
+ hasExplicitCaption -> message.message
53
+ !hasPreview -> message.message
54
+ else -> null
55
+ }
56
val hasCaption = captionText != null
57
val mediaInset = 4.dp
58
val mediaShape = remember(message.incoming) {
0 commit comments