remove use_system_contact

This commit is contained in:
Gautier Pelloux-Prayer 2015-09-08 13:16:31 +02:00
parent ad4feff82f
commit 0d0c0cd99e
6 changed files with 4 additions and 26 deletions

View file

@ -75,9 +75,8 @@ typedef enum _ContactSelectionMode {
@end
@interface ContactsViewController : UIViewController<UICompositeViewDelegate,ABPeoplePickerNavigationControllerDelegate,UISearchBarDelegate> {
BOOL use_systemView;
}
@interface ContactsViewController
: UIViewController <UICompositeViewDelegate, ABPeoplePickerNavigationControllerDelegate, UISearchBarDelegate>
@property(strong, nonatomic) IBOutlet ContactsTableViewController *tableController;
@property (nonatomic, strong) IBOutlet UINavigationController* sysViewController;

View file

@ -143,20 +143,7 @@ static UICompositeViewDescription *compositeDescription = nil;
frame.origin.y = toolBar.frame.origin.y + toolBar.frame.size.height;
_searchBar.frame = frame;
BOOL use_system = [[LinphoneManager instance] lpConfigBoolForKey:@"use_system_contacts"];
if (use_system && !self.sysViewController) { // use system contacts
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
picker.view.frame = self.view.frame;
[self.view addSubview:picker.view];
self.sysViewController = picker;
self.searchBar.hidden = TRUE;
} else if (!use_system) {
[self update];
} else {
// if table is already created, simply refresh buttons (selection mode changed, etc.)
[self refreshButtons];
}
[self update];
}
- (void)viewDidAppear:(BOOL)animated {

View file

@ -79,11 +79,6 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
BOOL use_system = [[LinphoneManager instance] lpConfigBoolForKey:@"use_system_contacts"];
if (use_system) {
_addContactButton.hidden = TRUE;
}
[_tableView loadData];
[[NSNotificationCenter defaultCenter] addObserver:self
@ -170,8 +165,6 @@ static UICompositeViewDescription *compositeDescription = nil;
char *addrURI = linphone_address_as_string_uri_only(addr);
_addressLabel.text = [NSString stringWithUTF8String:addrURI];
ms_free(addrURI);
_addContactButton.hidden = contact || [[LinphoneManager instance] lpConfigBoolForKey:@"use_system_contacts"];
}
#pragma mark - Action Functions

View file

@ -53,7 +53,6 @@ eq_active=0
preview_preference=0
animations_preference=1
edge_opt_preference=0
use_system_contacts=0
start_at_boot_preference=1
backgroundmode_preference=1
autoanswer_notif_preference=1

View file

@ -53,7 +53,6 @@ eq_active=0
preview_preference=1
animations_preference=1
edge_opt_preference=0
use_system_contacts=0
start_at_boot_preference=1
backgroundmode_preference=1
autoanswer_notif_preference=1

View file

@ -11,6 +11,7 @@
#import "LinphoneManager.h"
#import "KIF/KIFTypist.h"
#import "Utils.h"
@implementation LinphoneTestCase