Fixed issue reagarding missing chats
This commit is contained in:
parent
c2a627529a
commit
7025cabd2f
@ -200,4 +200,13 @@ public abstract class LocalDB {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link Chat} for all {@link Contact}s that do not have a chat.
|
||||
*
|
||||
* @since Envoy Client v0.1-beta
|
||||
*/
|
||||
public void createMissingChats() {
|
||||
users.values().stream().filter(u -> !u.equals(user) && getChat(u.getID()).isEmpty()).map(Chat::new).forEach(chats::add);
|
||||
}
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ public final class LoginScene {
|
||||
|
||||
// Save all users to the local database and flush cache
|
||||
localDB.setUsers(client.getUsers());
|
||||
localDB.createMissingChats();
|
||||
writeProxy.flushCache();
|
||||
} else
|
||||
// Set all contacts to offline mode
|
||||
|
Reference in New Issue
Block a user