Prepare Image & Video loading for E2EE

Changes the urls to make sure they are decrypted, while making sure that
it is backwards compatible to libQuotient 0.6
This commit is contained in:
Tobias Fella
2022-02-13 23:34:23 +01:00
parent db8b2fd64b
commit faeb1964bd
7 changed files with 28 additions and 16 deletions

View File

@@ -35,9 +35,9 @@ TimelineContainer {
innerObject: Image {
id: img
Layout.maximumWidth: imageDelegate.bubbleMaxWidth
source: "image://mxc/" + mediaId
Layout.maximumHeight: imageDelegate.bubbleMaxWidth / imageDelegate.info.w * imageDelegate.info.h
source: model.mediaUrl
Image {
anchors.fill: parent
@@ -95,7 +95,7 @@ TimelineContainer {
onTapped: {
fullScreenImage.createObject(parent, {
filename: eventId,
localPath: currentRoom.urlToDownload(eventId),
source: model.mediaUrl,
blurhash: model.content.info["xyz.amorgan.blurhash"],
imageWidth: content.info.w,
imageHeight: content.info.h