Allow clicking links in replies

fixes #529
This commit is contained in:
Nicolas Werner 2021-12-11 23:56:24 +01:00
parent d36ba00ff6
commit b4ef2ce60c
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -60,7 +60,14 @@ Item {
TapHandler { TapHandler {
acceptedButtons: Qt.LeftButton 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 gesturePolicy: TapHandler.ReleaseWithinBounds
} }