From 299cd9ced3cdb6e8dad24ce83e7f39cebbfb7039 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 5 Aug 2020 12:30:57 +0200 Subject: [PATCH] Fix / preview/edit was shown for movies and gif --- .../vector/app/features/attachments/ContentAttachmentData.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/attachments/ContentAttachmentData.kt b/vector/src/main/java/im/vector/app/features/attachments/ContentAttachmentData.kt index b2e46b1abf..bd13c0dac4 100644 --- a/vector/src/main/java/im/vector/app/features/attachments/ContentAttachmentData.kt +++ b/vector/src/main/java/im/vector/app/features/attachments/ContentAttachmentData.kt @@ -19,7 +19,9 @@ package im.vector.app.features.attachments import org.matrix.android.sdk.api.session.content.ContentAttachmentData fun ContentAttachmentData.isPreviewable(): Boolean { - return type == ContentAttachmentData.Type.IMAGE || type == ContentAttachmentData.Type.VIDEO + // For now the preview only supports still image + return type == ContentAttachmentData.Type.IMAGE + && listOf("image/jpeg", "image/png", "image/jpg").contains(getSafeMimeType() ?: "") } data class GroupedContentAttachmentData(