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 2e95018 commit ebb7925Copy full SHA for ebb7925
1 file changed
app/src/main/java/com/nextcloud/talk/ui/chat/MediaMessage.kt
@@ -57,7 +57,13 @@ fun MediaMessage(
57
val fileParameters =
58
remember { FileParameters(message.messageParameters as HashMap<String?, HashMap<String?, String?>>?) }
59
60
- val captionText = message.message.takeUnless { it == FILE_PLACEHOLDER_MESSAGE }
+ val hasExplicitCaption = message.plainMessage != FILE_PLACEHOLDER_MESSAGE
61
+ val hasPreview = !typeContent.previewUrl.isNullOrEmpty()
62
+ val captionText = when {
63
+ hasExplicitCaption -> message.message
64
+ !hasPreview -> message.message
65
+ else -> null
66
+ }
67
val hasCaption = captionText != null
68
val mediaInset = 4.dp
69
val mediaShape = remember(message.incoming) {
0 commit comments