Commented out the localDb client update stuff (temporary)

This commit is contained in:
DieGurke 2020-02-09 22:15:15 +01:00
parent e8062be346
commit 48a64b08f9

View File

@ -401,6 +401,18 @@ public class ChatWindow extends JFrame {
contactsModel.clear();
final java.util.List<User> 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();