summary refs log tree commit diff
path: root/resources/qml/TimelineDefaultMessageStyle.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-10-27 20:19:07 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-10-27 20:19:07 +0200
commit661d029d7ae4e98feda6dcef745f6044e8dfca9f (patch)
tree1bfe11b77ebcd6dab176b7cf4dd4b152a3ef9c1b /resources/qml/TimelineDefaultMessageStyle.qml
parentEnable even more qml linter warnings (diff)
downloadnheko-661d029d7ae4e98feda6dcef745f6044e8dfca9f.tar.xz
Bring back double tap and drag to reply
Diffstat (limited to '')
-rw-r--r--resources/qml/TimelineDefaultMessageStyle.qml19
1 files changed, 19 insertions, 0 deletions
diff --git a/resources/qml/TimelineDefaultMessageStyle.qml b/resources/qml/TimelineDefaultMessageStyle.qml
index f09fbc79..e9b52e93 100644
--- a/resources/qml/TimelineDefaultMessageStyle.qml
+++ b/resources/qml/TimelineDefaultMessageStyle.qml
@@ -269,6 +269,25 @@ TimelineEvent {
                 ]
             }
 
+            DragHandler {
+                id: replyDragHandler
+                yAxis.enabled: false
+                xAxis.enabled: true
+                xAxis.minimum: wrapper.avatarMargin - 100
+                xAxis.maximum: wrapper.avatarMargin
+                onActiveChanged: {
+                    if (!replyDragHandler.active) {
+                        if (replyDragHandler.xAxis.minimum <= replyDragHandler.xAxis.activeValue + 1) {
+                            wrapper.room.reply = wrapper.eventId
+                        }
+                        gridContainer.x = wrapper.avatarMargin;
+                    }
+                }
+            }
+
+            TapHandler {
+                onDoubleTapped: wrapper.room.reply = wrapper.eventId
+            }
         },
             TimelineMetadata {
                 id: metadata