diff --git a/Classes/ContactDetailsView.m b/Classes/ContactDetailsView.m index 61f49fcfa..723f0eacc 100644 --- a/Classes/ContactDetailsView.m +++ b/Classes/ContactDetailsView.m @@ -518,7 +518,7 @@ static UICompositeViewDescription *compositeDescription = nil; } - (IBAction)onDeleteClick:(id)sender { - NSString *msg = NSLocalizedString(@"Do you want to delete selected contact?", nil); + NSString *msg = NSLocalizedString(@"Do you want to delete selected contact?\nIt will also be deleted from your phone's address book.", nil); [UIConfirmationDialog ShowWithMessage:msg cancelMessage:nil confirmMessage:nil diff --git a/Classes/ContactsListTableView.m b/Classes/ContactsListTableView.m index c1720b482..c1c209342 100644 --- a/Classes/ContactsListTableView.m +++ b/Classes/ContactsListTableView.m @@ -404,27 +404,35 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { [NSNotificationCenter.defaultCenter removeObserver:self]; - [tableView beginUpdates]; + + NSString *msg = NSLocalizedString(@"Do you want to delete selected contact?\nIt will also be deleted from your phone's address book.", nil); + [UIConfirmationDialog ShowWithMessage:msg + cancelMessage:nil + confirmMessage:nil + onCancelClick:nil + onConfirmationClick:^() { + [tableView beginUpdates]; - NSString *firstChar = [addressBookMap keyAtIndex:[indexPath section]]; - NSMutableArray *subAr = [addressBookMap objectForKey:firstChar]; - Contact *contact = subAr[indexPath.row]; - [subAr removeObjectAtIndex:indexPath.row]; - if (subAr.count == 0) { - [addressBookMap removeObjectForKey:firstChar]; - [tableView deleteSections:[NSIndexSet indexSetWithIndex:indexPath.section] - withRowAnimation:UITableViewRowAnimationFade]; - } - UIContactCell* cell = [self.tableView cellForRowAtIndexPath:indexPath]; - [cell setContact:NULL]; - [[LinphoneManager.instance fastAddressBook] deleteContact:contact]; - [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; - [tableView endUpdates]; + NSString *firstChar = [addressBookMap keyAtIndex:[indexPath section]]; + NSMutableArray *subAr = [addressBookMap objectForKey:firstChar]; + Contact *contact = subAr[indexPath.row]; + [subAr removeObjectAtIndex:indexPath.row]; + if (subAr.count == 0) { + [addressBookMap removeObjectForKey:firstChar]; + [tableView deleteSections:[NSIndexSet indexSetWithIndex:indexPath.section] + withRowAnimation:UITableViewRowAnimationFade]; + } + UIContactCell* cell = [self.tableView cellForRowAtIndexPath:indexPath]; + [cell setContact:NULL]; + [[LinphoneManager.instance fastAddressBook] deleteContact:contact]; + [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; + [tableView endUpdates]; - [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(onAddressBookUpdate:) - name:kLinphoneAddressBookUpdate - object:nil]; - [self loadData]; + [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(onAddressBookUpdate:) + name:kLinphoneAddressBookUpdate + object:nil]; + [self loadData]; + }]; } } diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m index 56dc3399e..0872a80cb 100644 --- a/Classes/ContactsListView.m +++ b/Classes/ContactsListView.m @@ -205,7 +205,7 @@ static UICompositeViewDescription *compositeDescription = nil; } - (IBAction)onDeleteClick:(id)sender { - NSString *msg = [NSString stringWithFormat:NSLocalizedString(@"Do you want to delete selected contacts?", nil)]; + NSString *msg = [NSString stringWithFormat:NSLocalizedString(@"Do you want to delete selected contacts?\nThey will also be deleted from your phone's address book.", nil)]; [LinphoneManager.instance setContactsUpdated:TRUE]; [UIConfirmationDialog ShowWithMessage:msg cancelMessage:nil diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index e44719c9b..3c1330b8f 100644 Binary files a/Resources/ar.lproj/Localizable.strings and b/Resources/ar.lproj/Localizable.strings differ diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index 7e2638334..986ed9f90 100644 Binary files a/Resources/de.lproj/Localizable.strings and b/Resources/de.lproj/Localizable.strings differ diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index b7f9ddaba..14e247422 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 0102c0a47..6605c8eed 100644 Binary files a/Resources/fr.lproj/Localizable.strings and b/Resources/fr.lproj/Localizable.strings differ diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index 75c51b4ad..95cc3e4b4 100644 Binary files a/Resources/ja.lproj/Localizable.strings and b/Resources/ja.lproj/Localizable.strings differ diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index ffb1aa037..961bb0be8 100644 Binary files a/Resources/nl.lproj/Localizable.strings and b/Resources/nl.lproj/Localizable.strings differ diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 6708f04e1..06ba853e2 100644 Binary files a/Resources/ru.lproj/Localizable.strings and b/Resources/ru.lproj/Localizable.strings differ