Don't show body in replies to voice messages but rather show "Voice message" string (#1673)
Story: https://github.com/vector-im/element-meta/issues/2106
This commit is contained in:
parent
ec198ce2e9
commit
08e2bed5db
5 changed files with 7 additions and 7 deletions
|
|
@ -332,7 +332,7 @@ class MessagesPresenter @AssistedInject constructor(
|
||||||
type = AttachmentThumbnailType.Audio,
|
type = AttachmentThumbnailType.Audio,
|
||||||
)
|
)
|
||||||
is TimelineItemVoiceContent -> AttachmentThumbnailInfo(
|
is TimelineItemVoiceContent -> AttachmentThumbnailInfo(
|
||||||
textContent = targetEvent.content.body,
|
textContent = textContent,
|
||||||
type = AttachmentThumbnailType.Voice,
|
type = AttachmentThumbnailType.Voice,
|
||||||
)
|
)
|
||||||
is TimelineItemLocationContent -> AttachmentThumbnailInfo(
|
is TimelineItemLocationContent -> AttachmentThumbnailInfo(
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ private fun MessageSummary(event: TimelineItem.Event, modifier: Modifier = Modif
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
content = { ContentForBody(event.content.body) }
|
content = { ContentForBody(textContent) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Row(modifier = modifier) {
|
Row(modifier = modifier) {
|
||||||
|
|
|
||||||
|
|
@ -618,7 +618,6 @@ private fun attachmentThumbnailInfoForInReplyTo(inReplyTo: InReplyTo.Ready): Att
|
||||||
type = AttachmentThumbnailType.Audio,
|
type = AttachmentThumbnailType.Audio,
|
||||||
)
|
)
|
||||||
is VoiceMessageType -> AttachmentThumbnailInfo(
|
is VoiceMessageType -> AttachmentThumbnailInfo(
|
||||||
textContent = messageContent.body,
|
|
||||||
type = AttachmentThumbnailType.Voice,
|
type = AttachmentThumbnailType.Voice,
|
||||||
)
|
)
|
||||||
else -> null
|
else -> null
|
||||||
|
|
@ -630,6 +629,7 @@ private fun textForInReplyTo(inReplyTo: InReplyTo.Ready): String {
|
||||||
val messageContent = inReplyTo.content as? MessageContent ?: return ""
|
val messageContent = inReplyTo.content as? MessageContent ?: return ""
|
||||||
return when (messageContent.type) {
|
return when (messageContent.type) {
|
||||||
is LocationMessageType -> stringResource(CommonStrings.common_shared_location)
|
is LocationMessageType -> stringResource(CommonStrings.common_shared_location)
|
||||||
|
is VoiceMessageType -> stringResource(CommonStrings.common_voice_message)
|
||||||
else -> messageContent.body
|
else -> messageContent.body
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a1f8750e66aa2a60198fe68d2e3185bcf5a8708df81502f33c394d72f7b20a30
|
oid sha256:e8e50be96a1b204b8187fd76802650569a740a927739135a6b6307481f2d5568
|
||||||
size 42765
|
size 40453
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:fbb1233cf288e6ffc1aaa7136b56c412699897d7edd20bef82784562e302bf40
|
oid sha256:83f6cbcdbc00c49aed762339769e0f639604286406c46b1336b7757e2aad8b41
|
||||||
size 41215
|
size 38641
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue