Fix the LoadingFrameViewController not display on top of other content on tvOS

Also remove hacks that were put in place due to this bug previously.
This commit is contained in:
Cameron Gutman
2020-04-19 14:40:39 -07:00
parent 084018719a
commit 3cca55703e
2 changed files with 9 additions and 13 deletions

View File

@@ -827,7 +827,7 @@ static NSMutableSet* hostList;
}
#endif
-(void)beginForegroundRefresh:(bool)refreshAppList
-(void)beginForegroundRefresh
{
if (!_background) {
// This will kick off box art caching
@@ -838,7 +838,7 @@ static NSMutableSet* hostList;
[_discMan startDiscovery];
// This will refresh the applist when a paired host is selected
if (refreshAppList && _selectedHost != nil && _selectedHost.pairState == PairStatePaired) {
if (_selectedHost != nil && _selectedHost.pairState == PairStatePaired) {
[self hostClicked:_selectedHost view:nil];
}
}
@@ -878,7 +878,7 @@ static NSMutableSet* hostList;
{
_background = NO;
[self beginForegroundRefresh: YES];
[self beginForegroundRefresh];
// Check for a pending shortcut action when returning to foreground
[self handlePendingShortcutAction];
@@ -935,12 +935,7 @@ static NSMutableSet* hostList;
// this view via an error dialog from the stream
// view, so we won't get a return to active notification
// for that which would normally fire beginForegroundRefresh.
//
// On tvOS, we'll get a viewWillAppear when returning from the
// loading frame which will cause an infinite loop by starting
// another loading frame. To avoid this, just don't refresh
// if we're coming back from a loading frame view.
[self beginForegroundRefresh: !([_loadingFrame isShown] || [_loadingFrame isBeingDismissed])];
[self beginForegroundRefresh];
}
- (void)viewDidDisappear:(BOOL)animated