From b2f89db07fcfff58f4de974b636f4c6350b6b544 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 11 Apr 2018 12:05:03 +0200 Subject: [PATCH] reindent to be readable --- Classes/ContactDetailsView.m | 76 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/Classes/ContactDetailsView.m b/Classes/ContactDetailsView.m index 4524dcc5f..5ff5b20cd 100644 --- a/Classes/ContactDetailsView.m +++ b/Classes/ContactDetailsView.m @@ -260,52 +260,50 @@ _contact.lastName = _tmpContact.lastName.copy; while (_contact.sipAddresses.count > 0) { [_contact removeSipAddressAtIndex:0]; - } NSInteger nbSipAd = 0; while (_tmpContact.sipAddresses.count > nbSipAd) { [_contact addSipAddress:_tmpContact.sipAddresses[nbSipAd]]; nbSipAd++; } + while (_contact.phones.count > 0) { + [_contact removePhoneNumberAtIndex:0]; + } + NSInteger nbPhone = 0; + while (_tmpContact.phones.count > nbPhone) { + [_contact addPhoneNumber:_tmpContact.phones[nbPhone]]; + nbPhone++; + } + while (_contact.emails.count > 0) { + [_contact removeEmailAtIndex:0]; + } + NSInteger nbEmail = 0; + while (_tmpContact.emails.count > nbEmail) { + [_contact addEmail:_tmpContact.emails[nbEmail]]; + nbEmail++; + } + self.tmpContact = NULL; + [self saveData]; + } - while (_contact.phones.count > 0) { - [_contact removePhoneNumberAtIndex:0]; - } - NSInteger nbPhone = 0; - while (_tmpContact.phones.count > nbPhone) { - [_contact addPhoneNumber:_tmpContact.phones[nbPhone]]; - nbPhone++; - } - - while (_contact.emails.count > 0) { - [_contact removeEmailAtIndex:0]; - } - NSInteger nbEmail = 0; - while (_tmpContact.emails.count > nbEmail) { - [_contact addEmail:_tmpContact.emails[nbEmail]]; - nbEmail++; - } - 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.phones) { - if (![phone isEqualToString:@""]) { - rm = FALSE; - break; - } - } - } - if (rm) { - [LinphoneManager.instance.fastAddressBook deleteContact:_contact]; - } + BOOL rm = TRUE; + for (NSString *sip in _contact.sipAddresses) { + if (![sip isEqualToString:@""]) { + rm = FALSE; + break; + } + } + if (rm) { + for (NSString *phone in _contact.phones) { + if (![phone isEqualToString:@""]) { + rm = FALSE; + break; + } + } + } + if (rm) { + [LinphoneManager.instance.fastAddressBook deleteContact:_contact]; + } } #pragma mark - UICompositeViewDelegate Functions