Commit 58eb6d79 authored by Jackie's avatar Jackie

Adding gif playback

parent a4213242
......@@ -127,7 +127,12 @@ class UiModelMapper @Inject constructor(
getChatRoomAsync(message.roomId)?.let { chatRoom ->
message.urls?.forEach { url ->
mapUrl(message, url, chatRoom)?.let { list.add(it) }
if (url.url.endsWith(".gif")) {
val attachment = Attachment(imageUrl = url.url)
mapAttachment(message, attachment, chatRoom)?.let { list.add(it) }
} else {
mapUrl(message, url, chatRoom)?.let { list.add(it) }
}
}
message.attachments?.mapNotNull { attachment ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment