Fix popup opening at wrong place

fixes #512
pull/520/head
Nicolas Werner 4 years ago
parent c03f716e8b
commit 3da9c45df2
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      resources/qml/TimelineRow.qml
  2. 7
      resources/qml/TimelineView.qml

@ -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
}

@ -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

Loading…
Cancel
Save