mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Added blurhash and correct sizes to timeline images and animations throughout the app.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user