mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:11:45 +00:00
Update the timeline media QuickLook modifier. (#3593)
Not hooked up to any flows yet.
This commit is contained in:
@@ -116,7 +116,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
_ info: MatrixRustSDK.ImageInfo,
|
||||
_ mediaSource: MediaSource,
|
||||
_ isOutgoing: Bool) -> RoomTimelineItemProtocol {
|
||||
let imageInfo = ImageInfoProxy(source: mediaSource, width: info.width, height: info.height, mimeType: info.mimetype)
|
||||
let imageInfo = ImageInfoProxy(source: mediaSource, width: info.width, height: info.height, mimeType: info.mimetype, fileSize: info.size.map(UInt.init))
|
||||
|
||||
return StickerRoomTimelineItem(id: eventItemProxy.id,
|
||||
body: body,
|
||||
@@ -518,12 +518,14 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
let thumbnailInfo = ImageInfoProxy(source: messageContent.info?.thumbnailSource,
|
||||
width: messageContent.info?.thumbnailInfo?.width,
|
||||
height: messageContent.info?.thumbnailInfo?.height,
|
||||
mimeType: messageContent.info?.thumbnailInfo?.mimetype)
|
||||
mimeType: messageContent.info?.thumbnailInfo?.mimetype,
|
||||
fileSize: messageContent.info?.size.map(UInt.init))
|
||||
|
||||
let imageInfo = ImageInfoProxy(source: messageContent.source,
|
||||
width: messageContent.info?.width,
|
||||
height: messageContent.info?.height,
|
||||
mimeType: messageContent.info?.mimetype)
|
||||
mimeType: messageContent.info?.mimetype,
|
||||
fileSize: messageContent.info?.size.map(UInt.init))
|
||||
|
||||
return .init(filename: messageContent.filename,
|
||||
caption: messageContent.caption,
|
||||
@@ -542,13 +544,15 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
let thumbnailInfo = ImageInfoProxy(source: messageContent.info?.thumbnailSource,
|
||||
width: messageContent.info?.thumbnailInfo?.width,
|
||||
height: messageContent.info?.thumbnailInfo?.height,
|
||||
mimeType: messageContent.info?.thumbnailInfo?.mimetype)
|
||||
mimeType: messageContent.info?.thumbnailInfo?.mimetype,
|
||||
fileSize: messageContent.info?.size.map(UInt.init))
|
||||
|
||||
let videoInfo = VideoInfoProxy(source: messageContent.source,
|
||||
duration: messageContent.info?.duration ?? 0,
|
||||
width: messageContent.info?.width,
|
||||
height: messageContent.info?.height,
|
||||
mimeType: messageContent.info?.mimetype)
|
||||
mimeType: messageContent.info?.mimetype,
|
||||
fileSize: messageContent.info?.size.map(UInt.init))
|
||||
|
||||
return .init(filename: messageContent.filename,
|
||||
caption: messageContent.caption,
|
||||
|
||||
Reference in New Issue
Block a user