Fix popup opening at wrong place

fixes #512
This commit is contained in:
Nicolas Werner 2021-03-07 18:23:50 +01:00
parent c03f716e8b
commit 3da9c45df2
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
2 changed files with 4 additions and 7 deletions

View File

@ -28,11 +28,11 @@ Item {
TapHandler {
acceptedButtons: Qt.RightButton
onSingleTapped: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable, row, mapToItem(timelineRoot, eventPoint.position.x, eventPoint.position.y))
onSingleTapped: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable, row)
}
TapHandler {
onLongPressed: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable, row, mapToItem(timelineRoot, point.position.x, point.position.y))
onLongPressed: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable, row)
onDoubleTapped: chat.model.reply = model.id
}

View File

@ -80,15 +80,12 @@ Page {
property bool isEncrypted
property bool isEditable
function show(eventId_, eventType_, isEncrypted_, isEditable_, showAt_, position) {
function show(eventId_, eventType_, isEncrypted_, isEditable_, showAt_) {
eventId = eventId_;
eventType = eventType_;
isEncrypted = isEncrypted_;
isEditable = isEditable_;
if (position)
popup(position, showAt_);
else
popup(showAt_);
popup(showAt_);
}
modal: true