Fix Bug Showing Incorrect User Statuses #78
@ -135,7 +135,7 @@ public class Chat implements Serializable {
|
|||||||
*
|
*
|
||||||
* @since Envoy Client v0.1-beta
|
* @since Envoy Client v0.1-beta
|
||||||
*/
|
*/
|
||||||
public void incrementUnreadAmount() { unreadAmount++; }
|
public void incrementUnreadAmount() { ++unreadAmount; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the amount of unread messages in this chat
|
* @return the amount of unread messages in this chat
|
||||||
|
@ -155,8 +155,9 @@ public final class LocalDB implements EventListener {
|
|||||||
users.put(user.getName(), user);
|
users.put(user.getName(), user);
|
||||||
|
|
||||||
// Synchronize user status data
|
// Synchronize user status data
|
||||||
for (final var contact : users.values())
|
for (final var contact : user.getContacts())
|
||||||
if (contact instanceof User) getChat(contact.getID()).ifPresent(chat -> { ((User) chat.getRecipient()).setStatus(contact.getStatus()); });
|
if (contact instanceof User)
|
||||||
|
getChat(contact.getID()).ifPresent(chat -> { ((User) chat.getRecipient()).setStatus(((User) contact).getStatus()); });
|
||||||
|
|
||||||
// Create missing chats
|
// Create missing chats
|
||||||
user.getContacts()
|
user.getContacts()
|
||||||
|
Reference in New Issue
Block a user