[CNContact] fix filtered list

This commit is contained in:
Brieuc Viel 2017-12-06 10:18:12 +01:00
parent bdcc313831
commit 52e9e9d31c

View file

@ -158,6 +158,8 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)changeView:(ContactsCategory)view {
CGRect frame = _selectedButtonImage.frame;
if (view == ContactsAll && !allButton.selected) {
//REQUIRED TO RELOAD WITH FILTER
[LinphoneManager.instance setContactsUpdated:TRUE];
frame.origin.x = allButton.frame.origin.x;
[ContactSelection setSipFilter:nil];
[ContactSelection enableEmailFilter:FALSE];
@ -165,14 +167,14 @@ static UICompositeViewDescription *compositeDescription = nil;
linphoneButton.selected = FALSE;
[tableController loadData];
} else if (view == ContactsLinphone && !linphoneButton.selected) {
//REQUIRED TO RELOAD WITH FILTER
[LinphoneManager.instance setContactsUpdated:TRUE];
frame.origin.x = linphoneButton.frame.origin.x;
[ContactSelection setSipFilter:LinphoneManager.instance.contactFilter];
[ContactSelection enableEmailFilter:FALSE];
linphoneButton.selected = TRUE;
allButton.selected = FALSE;
[tableController loadData];
//REQUIRED TO RELOAD WITH FILTER
[LinphoneManager.instance setContactsUpdated:TRUE];
}
_selectedButtonImage.frame = frame;
}