From 0357a601d6c85a0d9d2b29457cd7e9fc3e986cdf Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Thu, 25 May 2023 11:49:23 +0200 Subject: [PATCH] Change if condition (for changeView) in ContactsListView --- Classes/ContactsListView.m | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m index 447d77694..829b32acc 100644 --- a/Classes/ContactsListView.m +++ b/Classes/ContactsListView.m @@ -97,7 +97,14 @@ static UICompositeViewDescription *compositeDescription = nil; if (![[PhoneMainView.instance getPreviousViewName] isEqualToString:@"ContactDetailsView"]) { _searchBar.text = @""; } - if (![LinphoneManager.instance lpConfigBoolForKey:@"only_show_sip_contacts_list"] && ![LinphoneManager.instance lpConfigBoolForKey:@"hide_sip_contacts_list"]) { + + if ([LinphoneManager.instance lpConfigBoolForKey:@"only_show_sip_contacts_list"]) { + _switchView.hidden = true; + [self changeView:ContactsLinphone]; + } else if ([LinphoneManager.instance lpConfigBoolForKey:@"hide_sip_contacts_list"]){ + _switchView.hidden = true; + [self changeView:ContactsAll]; + } else { [self changeView:ContactsAll]; } @@ -107,15 +114,6 @@ static UICompositeViewDescription *compositeDescription = nil; [tap setDelegate:self]; [self.view addGestureRecognizer:tap]; - - - if ([LinphoneManager.instance lpConfigBoolForKey:@"only_show_sip_contacts_list"]) { - _switchView.hidden = true; - [self changeView:ContactsLinphone]; - } else if ([LinphoneManager.instance lpConfigBoolForKey:@"hide_sip_contacts_list"]){ - _switchView.hidden = true; - [self changeView:ContactsAll]; - } } - (void)viewWillAppear:(BOOL)animated {