mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 16:22:39 +00:00
The collation bar was not displayed in the contacts viewcontroller
This commit is contained in:
parent
2f10552406
commit
bb1a42c85a
1 changed files with 6 additions and 19 deletions
|
@ -184,29 +184,16 @@ NSString *const kInvitationMessage = @"I'd like to chat with you with matrix. Pl
|
|||
}
|
||||
}
|
||||
|
||||
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)aTableView
|
||||
{
|
||||
NSMutableArray* titles = [[NSMutableArray alloc] initWithCapacity:10];
|
||||
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)aTableView {
|
||||
[self.tableView setSectionIndexColor:[AppDelegate theDelegate].masterTabBarController.tabBar.tintColor];
|
||||
[self.tableView setSectionIndexBackgroundColor:[UIColor clearColor]];
|
||||
|
||||
[titles addObjectsFromArray:[[UILocalizedIndexedCollation currentCollation] sectionIndexTitles]];
|
||||
|
||||
// force the background color
|
||||
if ([self.tableView respondsToSelector:@selector(setSectionIndexBackgroundColor:)]) {
|
||||
[self.tableView setSectionIndexBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
|
||||
return titles;
|
||||
return [[UILocalizedIndexedCollation currentCollation] sectionIndexTitles];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)aTableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
|
||||
{
|
||||
- (NSInteger)tableView:(UITableView *)aTableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {
|
||||
SectionedContacts* sectionedContacts = displayMatrixUsers ? sectionedMatrixContacts : sectionedLocalContacts;
|
||||
NSUInteger section;
|
||||
|
||||
@synchronized(self)
|
||||
{
|
||||
section = [sectionedContacts.sectionTitles indexOfObject:title];
|
||||
}
|
||||
NSUInteger section = [sectionedContacts.sectionTitles indexOfObject:title];
|
||||
|
||||
// undefined title -> jump to the first valid non empty section
|
||||
if (NSNotFound == section) {
|
||||
|
|
Loading…
Reference in a new issue