From ee0d70647cafd1d46175b1f2ecf544f25408a422 Mon Sep 17 00:00:00 2001 From: DieGurke Date: Mon, 31 Aug 2020 19:53:14 +0200 Subject: [PATCH] Edited onRestore method in ChatScene. --- .../java/envoy/client/ui/controller/ChatScene.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 c4e286b..1ad5d6e 100644 --- a/client/src/main/java/envoy/client/ui/controller/ChatScene.java +++ b/client/src/main/java/envoy/client/ui/controller/ChatScene.java @@ -346,7 +346,18 @@ public final class ChatScene implements Restorable { } @Override - public void onRestore() { updateRemainingCharsLabel(); } + public void onRestore() { + updateRemainingCharsLabel(); + settingsButton.setGraphic(new ImageView(IconUtil.loadIconThemeSensitive("settings", DEFAULT_ICON_SIZE))); + voiceButton.setGraphic(new ImageView(IconUtil.loadIconThemeSensitive("microphone", DEFAULT_ICON_SIZE))); + attachmentButton.setGraphic(new ImageView(IconUtil.loadIconThemeSensitive("attachment", DEFAULT_ICON_SIZE))); + attachmentView.setImage(DEFAULT_ATTACHMENT_VIEW_IMAGE); + messageSearchButton.setGraphic(new ImageView(IconUtil.loadIconThemeSensitive("search", DEFAULT_ICON_SIZE))); + clientProfilePic.setImage(IconUtil.loadIconThemeSensitive("user_icon", 43)); + chatList.setCellFactory(new ListCellFactory<>(ChatControl::new)); + if (currentChat.getRecipient() instanceof User) recipientProfilePic.setImage(IconUtil.loadIconThemeSensitive("user_icon", 43)); + else recipientProfilePic.setImage(IconUtil.loadIconThemeSensitive("group_icon", 43)); + } /** * Actions to perform when the list of contacts has been clicked.