From 3e10a6d530662243a485eebbd5a828f3fbb109ff Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 3 Apr 2020 12:58:15 -0400 Subject: [PATCH] Don't show popup when focusing unredactable event --- TODO.md | 1 - src/gui/Pages/Chat/Timeline/EventList.qml | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 9e15ca46..fc176a1f 100644 --- a/TODO.md +++ b/TODO.md @@ -46,7 +46,6 @@ - Long-press-drag to select multiple messages on touch - Drag to select multiple messages on non-touch -- Redacting messages - Make clicking on user/room mentions open relevant UI instead of matrix.to URL in browser - Make rooms fully manageable within Mirage: settings, permissions, kick, etc diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index f0204f54..08b8cdbd 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -51,6 +51,7 @@ Rectangle { } HShortcut { + enabled: (events && events.length > 0) || events === null sequences: window.settings.keys.removeFocusedOrSelectedMessages onActivated: utils.makePopup( "Popups/RedactPopup.qml", @@ -81,6 +82,8 @@ Rectangle { eventList.canRedact(eventList.currentItem.currentModel) ? [eventList.currentItem.currentModel] : + eventList.currentItem ? + [] : null function findLastRemovableDelegate() {