diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-03-07 18:23:50 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-03-07 18:23:50 +0100 |
commit | 3da9c45df245a004556f990720e3928e10857f7b (patch) | |
tree | 3083798cdb93b6623e2b3a1955d0351cf0846463 /resources | |
parent | Fix conflict between qmlformat and license check (diff) | |
download | nheko-3da9c45df245a004556f990720e3928e10857f7b.tar.xz |
Fix popup opening at wrong place
fixes #512
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/TimelineRow.qml | 4 | ||||
-rw-r--r-- | resources/qml/TimelineView.qml | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index ace7fc87..0f815f6f 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.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 } diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 905926c4..0a823329 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -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 |