mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Fix: Room directory: "No public rooms available" is displayed while loading
#1336
This commit is contained in:
parent
751544181d
commit
3787c00419
1 changed files with 16 additions and 4 deletions
|
@ -214,6 +214,10 @@ double const kPublicRoomsDirectoryDataExpiration = 10;
|
|||
{
|
||||
if (_hasReachedPaginationEnd)
|
||||
{
|
||||
if (complete)
|
||||
{
|
||||
complete(0);
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -339,13 +343,21 @@ double const kPublicRoomsDirectoryDataExpiration = 10;
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue