From 48a64b08f90f0c282c309a568b6069c8266a4057 Mon Sep 17 00:00:00 2001 From: DieGurke <55625494+DieGurke@users.noreply.github.com> Date: Sun, 9 Feb 2020 22:15:15 +0100 Subject: [PATCH] Commented out the localDb client update stuff (temporary) --- src/main/java/envoy/client/ui/ChatWindow.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/envoy/client/ui/ChatWindow.java b/src/main/java/envoy/client/ui/ChatWindow.java index 206f670..a14a67d 100644 --- a/src/main/java/envoy/client/ui/ChatWindow.java +++ b/src/main/java/envoy/client/ui/ChatWindow.java @@ -401,6 +401,18 @@ public class ChatWindow extends JFrame { contactsModel.clear(); final java.util.List contacts = ((SearchResultEvent) evt).get(); logger.info("Received contact search result " + contacts); + + // // Checks whether a contact received from the server as search result already + // // exists in the contacts of this client. if so, it does not get added to the + // // contactsModel, and so can not be added to the contacts. + // for (int i = 0; i < contacts.size(); i++) { + // for (int j = 0; j < localDb.getUsers().size(); j++) { + // if (!(contacts.get(i).getId() == + // localDb.getUsers().get(contacts.get(i).getName()).getId())) { + // contactsModel.add(contacts.get(i)); + // } + // } + // } contacts.forEach(contactsModel::add); revalidate(); repaint();