Improve the people invite screens

#904

- Keep visible the Local contacts header even if no local contacts is displayed in order to keep visible the check box "Matrix user only".
This commit is contained in:
giomfo
2017-01-27 11:55:48 +01:00
parent 016e3c3284
commit 13280105d3
@@ -505,10 +505,8 @@
{
searchInputSection = count++;
if (filteredLocalContacts.count)
{
filteredLocalContactsSection = count++;
}
// Keep visible the Local contacts header even if no local contacts is displayed in order to keep visible the check box "Matrix user only".
filteredLocalContactsSection = count++;
if (filteredMatrixContacts.count)
{
@@ -523,10 +521,8 @@
filteredLocalContacts = [self unfilteredLocalContactsArray];
}
if (filteredLocalContacts.count)
{
filteredLocalContactsSection = count++;
}
// Keep visible the Local contacts header even if no local contacts is displayed in order to keep visible the check box "Matrix user only".
filteredLocalContactsSection = count++;
}
// Enable the section shrinking only when all the contacts sections are displayed.
@@ -685,12 +681,13 @@
if (section == filteredLocalContactsSection)
{
headerLabel.text = NSLocalizedStringFromTable(@"contacts_address_book_section", @"Vector", nil);
headerLabel.text = [NSString stringWithFormat:@"%@ (%tu)", NSLocalizedStringFromTable(@"contacts_address_book_section", @"Vector", nil), filteredLocalContacts.count];
sectionBitwise = CONTACTS_TABLEVC_LOCALCONTACTS_BITWISE;
}
else //if (section == filteredMatrixContactsSection)
{
headerLabel.text = NSLocalizedStringFromTable(@"contacts_matrix_users_section", @"Vector", nil);
headerLabel.text = [NSString stringWithFormat:@"%@ (%tu)", NSLocalizedStringFromTable(@"contacts_matrix_users_section", @"Vector", nil), filteredMatrixContacts.count];
sectionBitwise = CONTACTS_TABLEVC_KNOWNCONTACTS_BITWISE;
}