mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-27 21:26:21 +00:00
Hide "Add Contact" when use_system_contacts is set.
This commit is contained in:
parent
21facbcd9c
commit
c6cd010487
1 changed files with 7 additions and 1 deletions
|
|
@ -120,6 +120,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
- (void)viewWillAppear:(BOOL)animated {
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
|
|
||||||
|
BOOL use_system = [[LinphoneManager instance] lpConfigBoolForKey:@"use_system_contacts"];
|
||||||
|
if( use_system ){
|
||||||
|
[addContactButton setHidden:TRUE];
|
||||||
|
}
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
selector:@selector(update)
|
selector:@selector(update)
|
||||||
name:kLinphoneAddressBookUpdate
|
name:kLinphoneAddressBookUpdate
|
||||||
|
|
@ -242,9 +247,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
[addressLabel setText:address];
|
[addressLabel setText:address];
|
||||||
|
|
||||||
// Hide/Show add button
|
// Hide/Show add button
|
||||||
|
BOOL use_system = [[LinphoneManager instance] lpConfigBoolForKey:@"use_system_contacts"];
|
||||||
if(contact) {
|
if(contact) {
|
||||||
[addContactButton setHidden:TRUE];
|
[addContactButton setHidden:TRUE];
|
||||||
} else {
|
} else if (!use_system) {
|
||||||
[addContactButton setHidden:FALSE];
|
[addContactButton setHidden:FALSE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue