From 72354b3678449e1a6e63b8f88356bbfb08103e73 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Tue, 9 Jun 2020 14:12:27 +0200 Subject: [PATCH] Fix user list in offline mode --- src/main/java/envoy/client/ui/controller/ChatScene.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/envoy/client/ui/controller/ChatScene.java b/src/main/java/envoy/client/ui/controller/ChatScene.java index e406060..ec00b2c 100644 --- a/src/main/java/envoy/client/ui/controller/ChatScene.java +++ b/src/main/java/envoy/client/ui/controller/ChatScene.java @@ -133,8 +133,7 @@ public final class ChatScene { this.client = client; this.writeProxy = writeProxy; - // TODO: handle offline mode - userList.setItems(FXCollections.observableList(localDB.getUser().getContacts().stream().collect(Collectors.toList()))); + userList.setItems(FXCollections.observableList(localDB.getChats().stream().map(Chat::getRecipient).collect(Collectors.toList()))); } @FXML