mirror of
https://github.com/Akomry/sae302_applicom.git
synced 2025-12-06 03:33:54 +00:00
feat(notif): Gestion des notifications pour les salons
This commit is contained in:
parent
76764860c9
commit
07578f9051
1 changed files with 5 additions and 6 deletions
|
|
@ -376,13 +376,13 @@ public class ChatController implements Initializable {
|
|||
|
||||
private void handlePostEvent(JSONObject content) {
|
||||
|
||||
LOGGER.finest("Selected: " + contactsListView.getSelectionModel().getSelectedItem());
|
||||
LOGGER.finest("From: " + content.getString("from"));
|
||||
LOGGER.finest("To: " + content.getString("to"));
|
||||
System.out.println("Selected: " + roomsListView.getSelectionModel().getSelectedItem());
|
||||
System.out.println("From: " + content.getString("from"));
|
||||
System.out.println("To: " + content.getString("to"));
|
||||
|
||||
try {
|
||||
if (!content.getString("to").contains("#")) {
|
||||
System.out.println("New message to contact!");
|
||||
LOGGER.info("New message to contact!");
|
||||
if (contactsListView.getSelectionModel().getSelectedItem().getLogin().equals(content.getString("to"))) {
|
||||
LOGGER.info("New message! to:dm, from:" + content.getString("from"));
|
||||
postVector.add(Post.fromJson(content));
|
||||
|
|
@ -419,7 +419,6 @@ public class ChatController implements Initializable {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
/*
|
||||
if (content.getString("to").contains("#")) {
|
||||
roomMap.get(content.getString("to")).getUnreadCount().incrementUnreadCount();
|
||||
roomsListView.refresh();
|
||||
|
|
@ -428,7 +427,7 @@ public class ChatController implements Initializable {
|
|||
contactMap.getContact(content.getString("from")).getUnreadCount().incrementUnreadCount();
|
||||
contactsListView.refresh();
|
||||
LOGGER.info("New message to contact + nothing sel");
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
private void handleContEvent(JSONObject content) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue