Avoid displaying error dialogs on passive actions like returning to foreground

This commit is contained in:
Cameron Gutman
2018-05-31 01:36:10 -07:00
parent e6e7ec9202
commit 5fd2c29a73

View File

@@ -302,7 +302,13 @@ static NSMutableSet* hostList;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting"]];
}]];
[applistAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:applistAlert animated:YES completion:nil];
if (view != nil) {
// Only display an alert if this was the result of a real
// user action, not just passively entering the foreground again
[self presentViewController:applistAlert animated:YES completion:nil];
}
host.online = NO;
[self showHostSelectionView];
});