Fixed issue reagarding missing chats
This commit is contained in:
parent
b8e001bf54
commit
5466602a33
@ -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