From 0d0c0cd99e7bd57b7fdcbc0da2790a4ff12c1c81 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Tue, 8 Sep 2015 13:16:31 +0200 Subject: [PATCH] remove use_system_contact --- Classes/ContactsViewController.h | 5 ++--- Classes/ContactsViewController.m | 15 +-------------- Classes/HistoryDetailsViewController.m | 7 ------- Resources/linphonerc | 1 - Resources/linphonerc~ipad | 1 - TestsUI/LinphoneTestCase.m | 1 + 6 files changed, 4 insertions(+), 26 deletions(-) diff --git a/Classes/ContactsViewController.h b/Classes/ContactsViewController.h index 43713caf2..deb1c612e 100644 --- a/Classes/ContactsViewController.h +++ b/Classes/ContactsViewController.h @@ -75,9 +75,8 @@ typedef enum _ContactSelectionMode { @end -@interface ContactsViewController : UIViewController { - BOOL use_systemView; -} +@interface ContactsViewController + : UIViewController @property(strong, nonatomic) IBOutlet ContactsTableViewController *tableController; @property (nonatomic, strong) IBOutlet UINavigationController* sysViewController; diff --git a/Classes/ContactsViewController.m b/Classes/ContactsViewController.m index 72332c618..05a20ae67 100644 --- a/Classes/ContactsViewController.m +++ b/Classes/ContactsViewController.m @@ -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 { diff --git a/Classes/HistoryDetailsViewController.m b/Classes/HistoryDetailsViewController.m index 4b74f74e5..dd6409418 100644 --- a/Classes/HistoryDetailsViewController.m +++ b/Classes/HistoryDetailsViewController.m @@ -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 diff --git a/Resources/linphonerc b/Resources/linphonerc index 1dbaa1ac9..ed50997f9 100644 --- a/Resources/linphonerc +++ b/Resources/linphonerc @@ -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 diff --git a/Resources/linphonerc~ipad b/Resources/linphonerc~ipad index 6acef404d..5546ca364 100644 --- a/Resources/linphonerc~ipad +++ b/Resources/linphonerc~ipad @@ -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 diff --git a/TestsUI/LinphoneTestCase.m b/TestsUI/LinphoneTestCase.m index aa3f2b2a1..dff0fadf9 100644 --- a/TestsUI/LinphoneTestCase.m +++ b/TestsUI/LinphoneTestCase.m @@ -11,6 +11,7 @@ #import "LinphoneManager.h" #import "KIF/KIFTypist.h" +#import "Utils.h" @implementation LinphoneTestCase