Directory section should be displayed by default in Messages when recents list is empty.

related to https://github.com/vector-im/vector-ios/issues/358
This commit is contained in:
giomfo
2016-06-03 10:28:46 +02:00
parent 58691b824a
commit 0165fed51c
6 changed files with 34 additions and 17 deletions
+12 -1
View File
@@ -230,7 +230,18 @@
if (self.splitViewController && (![self.splitViewController respondsToSelector:@selector(isCollapsed)] || !self.splitViewController.isCollapsed))
{
[self refreshCurrentSelectedCell:YES];
}
}
// The Directory cell is displayed when the recents list is empty
RecentsDataSource *recentsDataSource = (RecentsDataSource*)self.dataSource;
if (recentsDataSource.hidePublicRoomsDirectory)
{
recentsDataSource.hidePublicRoomsDirectory = (self.recentsTableView.numberOfSections != 0);
}
else if (homeViewController.searchBarHidden)
{
recentsDataSource.hidePublicRoomsDirectory = (self.recentsTableView.numberOfSections > 1);
}
}
- (void)scrollToTop:(BOOL)animated