From cf2b9cc18f728c876fec7a143f7b6a1edbc2fa30 Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Wed, 19 Oct 2022 14:55:34 -0400
Subject: [PATCH] chat-view: fix image message aspect ratio calculation

This fixes a binding loop, but introduces another less fatal one,
since commit d6ed9adf.

Change-Id: I67934b4cdde2efe04e20064fe41191241b0689b9
GitLab: #857
---
 src/app/commoncomponents/DataTransferMessageDelegate.qml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/commoncomponents/DataTransferMessageDelegate.qml b/src/app/commoncomponents/DataTransferMessageDelegate.qml
index 23a295680..56ba7607d 100644
--- a/src/app/commoncomponents/DataTransferMessageDelegate.qml
+++ b/src/app/commoncomponents/DataTransferMessageDelegate.qml
@@ -342,7 +342,7 @@ Loader {
                             sourceSize.width: width
                             sourceSize.height: height
                             source: "file:///" + Body
-                            property real aspectRatio: width / implicitHeight
+                            property real aspectRatio: implicitWidth / implicitHeight
                             property real adjustedWidth: Math.min(maxSize,
                                                                   Math.max(minSize,
                                                                            innerContent.width - senderMargin))
-- 
GitLab