Fix / preview/edit was shown for movies and gif

This commit is contained in:
Valere 2020-08-05 12:30:57 +02:00
parent 11c8da3717
commit 299cd9ced3
1 changed files with 3 additions and 1 deletions

View File

@ -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(