From 2ae7fefc0c898ca093064aa6478f32f5571ff253 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 3 Nov 2019 14:40:32 -0800 Subject: [PATCH] Prevent app grid from populating with empty cells during server info polling --- Limelight/ViewControllers/MainFrameViewController.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 79d914a..67226e4 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -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;