Replace hasLocalContacts with showLocalContacts.

Update the value of showLocalContacts in ContactsTableViewController.
This commit is contained in:
Doug
2021-08-09 12:58:18 +01:00
parent aa2f8d4d96
commit 0f87da3d53
3 changed files with 18 additions and 16 deletions
@@ -467,7 +467,7 @@
}
// Keep visible the header for the both contact sections, even if they're are empty.
if (BuildSettings.allowLocalContactsAccess && [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized)
if (BuildSettings.allowLocalContactsAccess && self.showLocalContacts && [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized)
{
filteredLocalContactsSection = count++;
}
@@ -482,7 +482,7 @@
}
// Keep visible the local contact header, even if the section is empty.
if (BuildSettings.allowLocalContactsAccess && [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized)
if (BuildSettings.allowLocalContactsAccess && self.showLocalContacts && [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized)
{
filteredLocalContactsSection = count++;
}
@@ -660,11 +660,6 @@
#pragma mark -
- (BOOL)hasLocalContacts
{
return filteredLocalContacts.count;
}
-(MXKContact *)contactAtIndexPath:(NSIndexPath*)indexPath
{
NSInteger row = indexPath.row;