forked from mirrors/linphone-iphone
Contact: to save a contact we must have both name and addr
This commit is contained in:
parent
bbff5e2df3
commit
5cedbdfa3a
1 changed files with 3 additions and 1 deletions
|
|
@ -118,7 +118,9 @@
|
|||
}
|
||||
|
||||
- (BOOL)isValid {
|
||||
return ((NSString *)_contact.phoneNumbers[0]).length + ((NSString *)_contact.sipAddresses[0]).length > 0;
|
||||
BOOL hasName = (_contact.firstName.length + _contact.lastName.length > 0)BOOL hasAddr =
|
||||
((NSString *)_contact.phoneNumbers[0]).length + ((NSString *)_contact.sipAddresses[0]).length > 0;
|
||||
return hasName && hasAddr;
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue