mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Wait for phone contact to be loaded before wrinting to userdefaults
This commit is contained in:
parent
6fecd10768
commit
83b3725771
1 changed files with 21 additions and 21 deletions
|
|
@ -203,30 +203,30 @@
|
|||
}];
|
||||
}
|
||||
|
||||
}];
|
||||
// load Linphone friends
|
||||
const MSList *lists = linphone_core_get_friends_lists(LC);
|
||||
while (lists) {
|
||||
LinphoneFriendList *fl = lists->data;
|
||||
const MSList *friends = linphone_friend_list_get_friends(fl);
|
||||
while (friends) {
|
||||
LinphoneFriend *f = friends->data;
|
||||
// only append friends that are not native contacts (already added
|
||||
// above)
|
||||
if (linphone_friend_get_ref_key(f) == NULL) {
|
||||
Contact *contact = [[Contact alloc] initWithFriend:f];
|
||||
[self registerAddrsFor:contact];
|
||||
// load Linphone friends
|
||||
const MSList *lists = linphone_core_get_friends_lists(LC);
|
||||
while (lists) {
|
||||
LinphoneFriendList *fl = lists->data;
|
||||
const MSList *friends = linphone_friend_list_get_friends(fl);
|
||||
while (friends) {
|
||||
LinphoneFriend *f = friends->data;
|
||||
// only append friends that are not native contacts (already added
|
||||
// above)
|
||||
if (linphone_friend_get_ref_key(f) == NULL) {
|
||||
Contact *contact = [[Contact alloc] initWithFriend:f];
|
||||
[self registerAddrsFor:contact];
|
||||
}
|
||||
friends = friends->next;
|
||||
}
|
||||
friends = friends->next;
|
||||
linphone_friend_list_update_subscriptions(fl);
|
||||
lists = lists->next;
|
||||
}
|
||||
linphone_friend_list_update_subscriptions(fl);
|
||||
lists = lists->next;
|
||||
}
|
||||
[self dumpContactsDisplayNamesToUserDefaults];
|
||||
[self dumpContactsDisplayNamesToUserDefaults];
|
||||
|
||||
[NSNotificationCenter.defaultCenter
|
||||
postNotificationName:kLinphoneAddressBookUpdate
|
||||
object:self];
|
||||
[NSNotificationCenter.defaultCenter
|
||||
postNotificationName:kLinphoneAddressBookUpdate
|
||||
object:self];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void) updateAddressBook:(NSNotification*) notif {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue