diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-11 23:56:24 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-11 23:56:24 +0100 |
commit | b4ef2ce60ca88da7f95cc1985fd609d939fe16a9 (patch) | |
tree | cca651e43a166300489075359906f047d1ad449e /resources | |
parent | Properly set position of resize handler after letting it go (diff) | |
download | nheko-b4ef2ce60ca88da7f95cc1985fd609d939fe16a9.tar.xz |
Allow clicking links in replies
fixes #529
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/delegates/Reply.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml index 547044f3..3b62abea 100644 --- a/resources/qml/delegates/Reply.qml +++ b/resources/qml/delegates/Reply.qml @@ -60,7 +60,14 @@ Item { TapHandler { acceptedButtons: Qt.LeftButton - onSingleTapped: room.showEvent(r.eventId) + onSingleTapped: { + let link = reply.child.linkAt(eventPoint.position.x, eventPoint.position.y - userName_.implicitHeight); + if (link) { + Nheko.openLink(link) + } else { + room.showEvent(r.eventId) + } + } gesturePolicy: TapHandler.ReleaseWithinBounds } |