diff --git a/src/libclient/accountmodel.cpp b/src/libclient/accountmodel.cpp index a7f00cdf527964f8f0778561d7dfc4a376b36197..955650c4f2ef4151db4c06ac5f32f9de2fc442ed 100644 --- a/src/libclient/accountmodel.cpp +++ b/src/libclient/accountmodel.cpp @@ -531,11 +531,12 @@ AccountModelPimpl::slotAccountStatusChanged(const QString& accountID, if (status != api::account::Status::INITIALIZING && accountInfo.status == api::account::Status::INITIALIZING) { // Detect when a new account is generated (keys are ready). During - // the generation, a Ring account got the "INITIALIZING" status. + // the generation, an account got the "INITIALIZING" status. // When keys are generated, the status will change. // The account is already added and initialized. Just update details from daemon updateAccountDetails(accountInfo); // This will load swarms as the account was not loaded before. + accountInfo.contactModel->initContacts(); accountInfo.conversationModel->initConversations(); Q_EMIT linked.accountAdded(accountID); } else if (!accountInfo.profileInfo.uri.isEmpty()) { diff --git a/src/libclient/api/contactmodel.h b/src/libclient/api/contactmodel.h index 1d33f73532bd0adba06f56a0d52eac9763e598d9..ca74537cca43b0a86c37378749e24416d83e3894 100644 --- a/src/libclient/api/contactmodel.h +++ b/src/libclient/api/contactmodel.h @@ -62,6 +62,8 @@ public: const BehaviorController& behaviorController); ~ContactModel(); + void initContacts(); + /** * Ask the daemon to add a contact. * @param contactInfo diff --git a/src/libclient/contactmodel.cpp b/src/libclient/contactmodel.cpp index e9641655bf1d293a785228337a6677839c76bc04..5655b6c10c2f7047a9f0cd03c1e23bbe844d6f21 100644 --- a/src/libclient/contactmodel.cpp +++ b/src/libclient/contactmodel.cpp @@ -237,6 +237,11 @@ ContactModel::ContactModel(const account::Info& owner, ContactModel::~ContactModel() {} +void +ContactModel::initContacts() { + pimpl_->fillWithJamiContacts(); +} + const ContactModel::ContactInfoMap& ContactModel::getAllContacts() const {