diff --git a/Classes/ContactDetailsView.m b/Classes/ContactDetailsView.m index f8546f756..09bdf64c9 100644 --- a/Classes/ContactDetailsView.m +++ b/Classes/ContactDetailsView.m @@ -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]; + } } } diff --git a/Classes/ContactsListTableView.m b/Classes/ContactsListTableView.m index 29703d0f2..f73ebd72e 100644 --- a/Classes/ContactsListTableView.m +++ b/Classes/ContactsListTableView.m @@ -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];