Bring back double tap and drag to reply

This commit is contained in:
Nicolas Werner 2023-10-27 20:19:07 +02:00
parent 6fef6ad5f1
commit 661d029d7a
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 42 additions and 0 deletions

View file

@ -281,6 +281,8 @@ TimelineEvent {
data: [replyRow, wrapper.main] data: [replyRow, wrapper.main]
} }
} }
padding: wrapper.isStateEvent ? 0 : 4 padding: wrapper.isStateEvent ? 0 : 4
@ -291,6 +293,27 @@ TimelineEvent {
border.width: wrapper.notificationlevel == MtxEvent.Highlight ? 1 : 0 border.width: wrapper.notificationlevel == MtxEvent.Highlight ? 1 : 0
} }
} }
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
}
}, },
Reactions { Reactions {
id: reactionRow id: reactionRow

View file

@ -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 { TimelineMetadata {
id: metadata id: metadata