mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge pull request #1339 from vector-im/riot_1336
Room directory: "No public rooms available" bug fixes
This commit is contained in:
commit
589d7e7d4a
2 changed files with 22 additions and 5 deletions
|
@ -214,6 +214,10 @@ double const kPublicRoomsDirectoryDataExpiration = 10;
|
|||
{
|
||||
if (_hasReachedPaginationEnd)
|
||||
{
|
||||
if (complete)
|
||||
{
|
||||
complete(0);
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -338,14 +342,22 @@ double const kPublicRoomsDirectoryDataExpiration = 10;
|
|||
tableViewCell.textLabel.font = [UIFont systemFontOfSize:15.0];
|
||||
tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
|
||||
if (_searchPattern.length)
|
||||
|
||||
if (state == MXKDataSourceStateReady)
|
||||
{
|
||||
tableViewCell.textLabel.text = NSLocalizedStringFromTable(@"search_no_result", @"Vector", nil);
|
||||
if (_searchPattern.length)
|
||||
{
|
||||
tableViewCell.textLabel.text = NSLocalizedStringFromTable(@"search_no_result", @"Vector", nil);
|
||||
}
|
||||
else
|
||||
{
|
||||
tableViewCell.textLabel.text = NSLocalizedStringFromTable(@"room_directory_no_public_room", @"Vector", nil);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tableViewCell.textLabel.text = NSLocalizedStringFromTable(@"room_directory_no_public_room", @"Vector", nil);
|
||||
// Show nothing while loading and in other cases
|
||||
tableViewCell.textLabel.text = @"";
|
||||
}
|
||||
|
||||
return tableViewCell;
|
||||
|
|
|
@ -210,7 +210,12 @@
|
|||
{
|
||||
if (indexPath.section == recentsDataSource.directorySection)
|
||||
{
|
||||
[self openPublicRoomAtIndexPath:indexPath];
|
||||
// Sanity check
|
||||
MXPublicRoom *publicRoom = [recentsDataSource.publicRoomsDirectoryDataSource roomAtIndexPath:indexPath];
|
||||
if (publicRoom)
|
||||
{
|
||||
[self openPublicRoomAtIndexPath:indexPath];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue