diff --git a/Classes/ContactDetailsView.m b/Classes/ContactDetailsView.m index 4374fd214..727a19190 100644 --- a/Classes/ContactDetailsView.m +++ b/Classes/ContactDetailsView.m @@ -260,6 +260,24 @@ self.tmpContact = NULL; [self saveData]; } + BOOL rm = TRUE; + for (NSString *sip in _contact.sipAddresses) { + if (![sip isEqualToString:@""]) { + rm = FALSE; + break; + } + } + if (rm) { + for (NSString *phone in _contact.phoneNumbers) { + if (![phone isEqualToString:@""]) { + rm = FALSE; + break; + } + } + } + if (rm) { + [LinphoneManager.instance.fastAddressBook removeContact:_contact]; + } } #pragma mark - UICompositeViewDelegate Functions