From fb1147f939f3f94f056a57cfc504ffc0dacf1028 Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 5 Oct 2020 18:52:05 +0200 Subject: [PATCH] Add Local Deletion of Messages Also for Messages You did not Send (#80) Reviewed-on: https://git.kske.dev/zdm/envoy/pulls/80 Reviewed-by: kske Reviewed-by: DieGurke --- .../java/envoy/client/ui/control/MessageControl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/main/java/envoy/client/ui/control/MessageControl.java b/client/src/main/java/envoy/client/ui/control/MessageControl.java index 862bb45..0cd14c4 100644 --- a/client/src/main/java/envoy/client/ui/control/MessageControl.java +++ b/client/src/main/java/envoy/client/ui/control/MessageControl.java @@ -76,12 +76,10 @@ public final class MessageControl extends Label { items.add(copyMenuItem); } - // Delete message - if own message - action - if (ownMessage && client.isOnline()) { - final var deleteMenuItem = new MenuItem("Delete locally"); - deleteMenuItem.setOnAction(e -> MessageUtil.deleteMessage(message)); - items.add(deleteMenuItem); - } + // Delete message + final var deleteMenuItem = new MenuItem("Delete locally"); + deleteMenuItem.setOnAction(e -> MessageUtil.deleteMessage(message)); + items.add(deleteMenuItem); // As long as these types of messages are not implemented and no caches are // defined for them, we only want them to appear when being online