summary refs log tree commit diff
path: root/resources/qml/delegates/ImageMessage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/delegates/ImageMessage.qml')
-rw-r--r--resources/qml/delegates/ImageMessage.qml33
1 files changed, 7 insertions, 26 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index 509e80a6..f2811869 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -28,34 +28,15 @@ AbstractButton {
     height: width*proportionalHeight
     hoverEnabled: true
 
-    state: img.status != Image.Ready ? "ImageLoading" : (timeline.privacyScreen.active ? "PrivacyScreenVisible" : "PrivacyScreenInvisible")
+    state: (img.status != Image.Ready || timeline.privacyScreen.active) ? "BlurhashVisible" : "ImageVisible"
     states: [
         State {
-            name: "ImageLoading"
+            name: "BlurhashVisible"
 
             PropertyChanges {
                 target: blurhash_
-                opacity: 1
-                visible: true
-            }
-
-            PropertyChanges {
-                target: img
-                opacity: 0
-            }
-
-            PropertyChanges {
-                target: mxcimage
-                opacity: 0
-            }
-        },
-        State {
-            name: "PrivacyScreenVisible"
-
-            PropertyChanges {
-                target: blurhash_
-                opacity: blurhash ? 1 : 0
-                visible: blurhash ? true : false
+                opacity: (img.status != Image.Ready) || (timeline.privacyScreen.active && blurhash) ? 1 : 0
+                visible: (img.status != Image.Ready) || (timeline.privacyScreen.active && blurhash)
             }
 
             PropertyChanges {
@@ -69,7 +50,7 @@ AbstractButton {
             }
         },
         State {
-            name: "PrivacyScreenInvisible"
+            name: "ImageVisible"
 
             PropertyChanges {
                 target: blurhash_
@@ -90,8 +71,8 @@ AbstractButton {
     ]
     transitions: [
         Transition {
-            from: "PrivacyScreenInvisible"
-            to: "PrivacyScreenVisible"
+            from: "ImageVisible"
+            to: "BlurhashVisible"
             reversible: true
 
             SequentialAnimation {