Added blurhash and correct sizes to timeline images and animations throughout the app.

This commit is contained in:
Stefan Ceriu
2022-04-05 15:09:04 +03:00
parent 88a0654d23
commit 8d50d4fd25
9 changed files with 233 additions and 11 deletions
@@ -6,7 +6,7 @@
// Copyright © 2022 Element. All rights reserved.
//
import Foundation
import UIKit
import MatrixRustSDK
struct ImageRoomMessage: RoomMessageProtocol {
@@ -35,4 +35,24 @@ struct ImageRoomMessage: RoomMessageProtocol {
var url: String? {
message.url()
}
var width: CGFloat? {
guard let width = message.width() else {
return nil
}
return CGFloat(width)
}
var height: CGFloat? {
guard let height = message.height() else {
return nil
}
return CGFloat(height)
}
var blurhash: String? {
message.blurhash()
}
}