mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 07:44:00 +01:00
Attachment preview also for Gif files
This commit is contained in:
parent
eb30b9fae9
commit
439029467a
@ -24,6 +24,8 @@
|
||||
<w>pbkdf</w>
|
||||
<w>pids</w>
|
||||
<w>pkcs</w>
|
||||
<w>previewable</w>
|
||||
<w>previewables</w>
|
||||
<w>riotx</w>
|
||||
<w>signin</w>
|
||||
<w>signout</w>
|
||||
|
@ -18,10 +18,12 @@ package im.vector.app.features.attachments
|
||||
|
||||
import org.matrix.android.sdk.api.session.content.ContentAttachmentData
|
||||
|
||||
private val listOfPreviewableMimeTypes = listOf("image/jpeg", "image/png", "image/jpg", "image/gif")
|
||||
|
||||
fun ContentAttachmentData.isPreviewable(): Boolean {
|
||||
// For now the preview only supports still image
|
||||
return type == ContentAttachmentData.Type.IMAGE
|
||||
&& listOf("image/jpeg", "image/png", "image/jpg").contains(getSafeMimeType() ?: "")
|
||||
&& listOfPreviewableMimeTypes.contains(getSafeMimeType() ?: "")
|
||||
}
|
||||
|
||||
data class GroupedContentAttachmentData(
|
||||
|
Loading…
Reference in New Issue
Block a user