From 58613446f0ecec2cc7dab4ae8d949e684461c63e Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 24 Sep 2020 02:56:22 -0400 Subject: [PATCH] Fix event context menu targeting wrong message If user right clicked on the most recent event in the timeline (index 0), a new message was posted in the room (the new index 0), and the user right clicked on it, the EventContextMenu's `event` property relying on the index would not detect any change and thus would still target the previous event. This affected options depending on this property like "Reply". The problem was reproducible with any same index repetition, not just 0. --- src/gui/Pages/Chat/Timeline/EventContextMenu.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/Pages/Chat/Timeline/EventContextMenu.qml b/src/gui/Pages/Chat/Timeline/EventContextMenu.qml index 2c7d9446..14a59fed 100644 --- a/src/gui/Pages/Chat/Timeline/EventContextMenu.qml +++ b/src/gui/Pages/Chat/Timeline/EventContextMenu.qml @@ -34,7 +34,10 @@ HMenu { } - onClosed: hoveredLink = "" + onClosed: { + hoveredLink = "" + eventIndex = -1 + } HMenuItem { icon.name: "toggle-select-message"