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 <kai@kske.dev>
Reviewed-by: DieGurke <maxi@kske.dev>
This commit is contained in:
Leon Hofmeister 2020-10-05 18:52:05 +02:00
parent 7ca770cbc3
commit fb1147f939
Signed by: Käfer & Engelbart Git
GPG Key ID: 70F2F9206EDC1FCE

View File

@ -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