From a515ec961a0251041d285f85df3f92638c2de070 Mon Sep 17 00:00:00 2001 From: delvh Date: Sat, 10 Oct 2020 22:25:39 +0200 Subject: [PATCH] Add server side contact deletion --- .../envoy/client/ui/controller/ChatScene.java | 2 +- client/src/main/resources/fxml/ChatScene.fxml | 2 +- .../ContactDeletionSinceLastLogin.java | 15 +++++ .../java/envoy/util/SerializationUtils.java | 8 +-- .../main/java/envoy/server/data/Message.java | 2 +- .../envoy/server/data/PersistenceManager.java | 38 ++++++++++++- .../src/main/java/envoy/server/data/User.java | 15 +++++ .../processors/ContactOperationProcessor.java | 55 +++++++++++++++---- .../processors/LoginCredentialProcessor.java | 5 ++ 9 files changed, 122 insertions(+), 20 deletions(-) create mode 100644 common/src/main/java/envoy/event/contact/ContactDeletionSinceLastLogin.java diff --git a/client/src/main/java/envoy/client/ui/controller/ChatScene.java b/client/src/main/java/envoy/client/ui/controller/ChatScene.java index c2b0ef1..4103a5b 100644 --- a/client/src/main/java/envoy/client/ui/controller/ChatScene.java +++ b/client/src/main/java/envoy/client/ui/controller/ChatScene.java @@ -191,7 +191,6 @@ public final class ChatScene implements EventListener, Restorable { // Set the design of the box in the upper-left corner settingsButton.setAlignment(Pos.BOTTOM_RIGHT); - HBox.setHgrow(spaceBetweenUserAndSettingsButton, Priority.ALWAYS); generateOwnStatusControl(); Platform.runLater(() -> { @@ -727,6 +726,7 @@ public final class ChatScene implements EventListener, Restorable { // Else prepend it to the HBox children final var ownUserControl = new ContactControl(localDB.getUser()); ownUserControl.setAlignment(Pos.CENTER_LEFT); + HBox.setHgrow(ownUserControl, Priority.NEVER); ownContactControl.getChildren().add(0, ownUserControl); } } diff --git a/client/src/main/resources/fxml/ChatScene.fxml b/client/src/main/resources/fxml/ChatScene.fxml index d3fb6e9..8221f19 100644 --- a/client/src/main/resources/fxml/ChatScene.fxml +++ b/client/src/main/resources/fxml/ChatScene.fxml @@ -167,7 +167,7 @@ + fx:id="spaceBetweenUserAndSettingsButton" HBox.hgrow="ALWAYS" />