Commit b2f89db0 authored by Benjamin REIS's avatar Benjamin REIS

reindent to be readable

parent 9010c8a2
...@@ -260,52 +260,50 @@ ...@@ -260,52 +260,50 @@
_contact.lastName = _tmpContact.lastName.copy; _contact.lastName = _tmpContact.lastName.copy;
while (_contact.sipAddresses.count > 0) { while (_contact.sipAddresses.count > 0) {
[_contact removeSipAddressAtIndex:0]; [_contact removeSipAddressAtIndex:0];
} }
NSInteger nbSipAd = 0; NSInteger nbSipAd = 0;
while (_tmpContact.sipAddresses.count > nbSipAd) { while (_tmpContact.sipAddresses.count > nbSipAd) {
[_contact addSipAddress:_tmpContact.sipAddresses[nbSipAd]]; [_contact addSipAddress:_tmpContact.sipAddresses[nbSipAd]];
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) { BOOL rm = TRUE;
[_contact removePhoneNumberAtIndex:0]; for (NSString *sip in _contact.sipAddresses) {
} if (![sip isEqualToString:@""]) {
NSInteger nbPhone = 0; rm = FALSE;
while (_tmpContact.phones.count > nbPhone) { break;
[_contact addPhoneNumber:_tmpContact.phones[nbPhone]]; }
nbPhone++; }
} if (rm) {
for (NSString *phone in _contact.phones) {
while (_contact.emails.count > 0) { if (![phone isEqualToString:@""]) {
[_contact removeEmailAtIndex:0]; rm = FALSE;
} break;
NSInteger nbEmail = 0; }
while (_tmpContact.emails.count > nbEmail) { }
[_contact addEmail:_tmpContact.emails[nbEmail]]; }
nbEmail++; if (rm) {
} [LinphoneManager.instance.fastAddressBook deleteContact:_contact];
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];
}
} }
#pragma mark - UICompositeViewDelegate Functions #pragma mark - UICompositeViewDelegate Functions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment