prepare for handling multiple mms attachments

This commit is contained in:
tibbi 2020-04-12 18:13:40 +02:00
parent 59ba80d65a
commit a5d8633593
5 changed files with 17 additions and 12 deletions

View file

@ -187,10 +187,11 @@ class ThreadAdapter(
thread_message_body.setTextColor(background.getContrastColor())
}
if (message.attachment != null) {
val type = message.attachment.type
if (message.attachment?.attachments?.isNotEmpty() == true) {
val attachment = message.attachment.attachments.first()
val type = attachment.type
if (type.startsWith("image/") || type.startsWith("video/")) {
val uri = message.attachment.uri
val uri = attachment.uri
val options = RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.NONE)
.transform(FitCenter(), RoundedCorners(roundedCornersRadius))