From 9c4d37f64b689d4420cafcc44f995af76bf5a9d0 Mon Sep 17 00:00:00 2001 From: miruka Date: Wed, 2 Sep 2020 10:50:09 -0400 Subject: [PATCH] Fix copying non-message single event text For events with no body in their source, copy Mirage's generated content text. --- src/gui/Pages/Chat/Timeline/EventContent.qml | 2 -- src/gui/Pages/Chat/Timeline/EventContextMenu.qml | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/Pages/Chat/Timeline/EventContent.qml b/src/gui/Pages/Chat/Timeline/EventContent.qml index f668d13c..0eb321b6 100644 --- a/src/gui/Pages/Chat/Timeline/EventContent.qml +++ b/src/gui/Pages/Chat/Timeline/EventContent.qml @@ -300,8 +300,6 @@ HRowLayout { id: linksRepeater property EventMediaLoader lastHovered: null - property var pr: lastHovered - onPrChanged: print("pr changed:", pr) model: { const links = JSON.parse(eventDelegate.currentModel.links) diff --git a/src/gui/Pages/Chat/Timeline/EventContextMenu.qml b/src/gui/Pages/Chat/Timeline/EventContextMenu.qml index cca9b91e..f22103ef 100644 --- a/src/gui/Pages/Chat/Timeline/EventContextMenu.qml +++ b/src/gui/Pages/Chat/Timeline/EventContextMenu.qml @@ -95,7 +95,10 @@ HMenu { onTriggered: { if (! eventList.selectedCount){ - Clipboard.text = JSON.parse(event.source).body + Clipboard.text = + JSON.parse(event.source).body || + utils.stripHtmlTags(utils.processedEventText(event)) + return }