Implemented contact removal operation (untested)
This commit is contained in:
		| @@ -109,10 +109,12 @@ public final class ChatScene { | ||||
| 					case ADD: | ||||
| 						localDB.getUsers().put(contact.getName(), contact); | ||||
| 						localDB.getChats().add(new Chat(contact)); | ||||
| 						userList.getItems().add(contact);// TODO might cause contact duplication | ||||
| 						userList.getItems().add(contact); | ||||
| 						break; | ||||
| 					case REMOVE: | ||||
| 						// TODO add deletion capability | ||||
| 						localDB.getUsers().remove(contact.getName()); | ||||
| 						localDB.getChats().removeIf(c -> c.getRecipient().getID() == contact.getID()); | ||||
| 						userList.getItems().removeIf(c -> c.getID() == contact.getID()); | ||||
| 						break; | ||||
| 				} | ||||
| 			}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user