Prevent app grid from populating with empty cells during server info polling

This commit is contained in:
Cameron Gutman
2019-11-03 14:40:32 -08:00
parent 72af5d5217
commit 2ae7fefc0c

View File

@@ -259,6 +259,7 @@ static NSMutableSet* hostList;
[_appManager stopRetrieving];
_selectedHost = nil;
_sortedAppList = nil;
self.title = @"Select Host";
[self disableUpButton];
@@ -1137,8 +1138,8 @@ static NSMutableSet* hostList;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
if (_selectedHost != nil) {
return _selectedHost.appList.count;
if (_selectedHost != nil && _sortedAppList != nil) {
return _sortedAppList.count;
}
else {
return 0;