Fixed missing presence on contacts at startup sometimes
This commit is contained in:
parent
fc5da7f57d
commit
0ef866c3e3
1 changed files with 7 additions and 0 deletions
|
@ -236,10 +236,17 @@ class AsyncContactsLoader extends AsyncTask<Void, Void, AsyncContactsLoader.Asyn
|
||||||
ContactsManager.getInstance().getContactsListeners()) {
|
ContactsManager.getInstance().getContactsListeners()) {
|
||||||
listener.onContactsUpdated();
|
listener.onContactsUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LinphoneContact contact : data.contacts) {
|
for (LinphoneContact contact : data.contacts) {
|
||||||
contact.createOrUpdateFriendFromNativeContact();
|
contact.createOrUpdateFriendFromNativeContact();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now that contact fetching is asynchronous, this is required to ensure
|
||||||
|
// presence subscription event will be sent with all friends
|
||||||
|
for (FriendList list : LinphoneManager.getLc().getFriendsLists()) {
|
||||||
|
list.updateSubscriptions();
|
||||||
|
}
|
||||||
|
|
||||||
ContactsManager.getInstance().setContacts(data.contacts);
|
ContactsManager.getInstance().setContacts(data.contacts);
|
||||||
ContactsManager.getInstance().setSipContacts(data.sipContacts);
|
ContactsManager.getInstance().setSipContacts(data.sipContacts);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue