- property var thumbnailWidth: event.content.info.thumbnail_info.w
- property var thumbnailHeight: event.content.info.thumbnail_info.h
-
- property var imageMxcUri: event.content.file.url || event.content.url
- property var imageKey: event.content.file.key.k || ""
- property var imageIv: event.content.file.iv || ""
+ property var thumbnailWidth: thumbnailInfo.w
+ property var thumbnailHeight: thumbnailInfo.h
+
+ property var imageInfo: event.content.info || {}
+ property var imageFile: event.content.file || {}
+ property var imageMxcUri: imageFile.url || event.content.url
+ property var imageKey: imageFile.key ? imageFile.key.k : ""
+ property var imageIv: imageFile.iv || ""
property var imageUri: thumbnailMxcUri ? matrixSdk.mxcUriToHttp(imageMxcUri) : kazvIOManager.cacheFile(matrixSdk.mxcUriToHttp(imageMxcUri), event.eventId) // If there are no thumbnail, cache the image
- property var imageWidth: event.content.info.w
- property var imageHeight: event.content.info.h
+ property var imageWidth: imageInfo.w
+ property var imageHeight: imageInfo.h
property var previewUri: thumbnailMxcUri ? thumbnailUri : imageUri // Uri for source of Image QML type
property var innerContentWidth: upper.contentMaxWidth - bubble.bubbleSpacing
property var kazvIOJob: thumbnailUri ? kazvIOManager.getDownloadJob(event.eventId) : (imageUri ? kazvIOManager.getDownloadJob(event.eventId) : null) // If the network environment is normal, this property becomes null when the image (or thumbnail) has been cached