mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
Contacts: fix crash when deleting contact with swipe
This commit is contained in:
parent
59030ec972
commit
f1077154eb
2 changed files with 5 additions and 2 deletions
|
|
@ -65,6 +65,9 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
_emptyLabel.hidden = YES;
|
||||
} else {
|
||||
_emptyLabel.hidden = NO;
|
||||
if (!IPAD) {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
OrderedDictionary *subDic = [addressBookMap objectForKey:[addressBookMap keyAtIndex:[indexPath section]]];
|
||||
NSString *key = [[subDic allKeys] objectAtIndex:[indexPath row]];
|
||||
ABRecordRef contact = (__bridge ABRecordRef)([subDic objectForKey:key]);
|
||||
NSString *firstChar = [[self displayNameForContact:contact] substringToIndex:1];
|
||||
NSString *firstChar = [[self displayNameForContact:contact] substringToIndex:1].uppercaseString;
|
||||
[[addressBookMap objectForKey:firstChar] removeObjectForKey:[self displayNameForContact:contact]];
|
||||
if ([tableView numberOfRowsInSection:indexPath.section] == 1) {
|
||||
[addressBookMap removeObjectForKey:firstChar];
|
||||
|
|
@ -268,7 +268,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
OrderedDictionary *subDic = [addressBookMap objectForKey:[addressBookMap keyAtIndex:[indexPath section]]];
|
||||
NSString *key = [[subDic allKeys] objectAtIndex:[indexPath row]];
|
||||
ABRecordRef contact = (__bridge ABRecordRef)([subDic objectForKey:key]);
|
||||
NSString *firstChar = [[self displayNameForContact:contact] substringToIndex:1];
|
||||
NSString *firstChar = [[self displayNameForContact:contact] substringToIndex:1].uppercaseString;
|
||||
[[addressBookMap objectForKey:firstChar] removeObjectForKey:[self displayNameForContact:contact]];
|
||||
if ([self.tableView numberOfRowsInSection:indexPath.section] == 1) {
|
||||
[addressBookMap removeObjectForKey:firstChar];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue