Fixes RefreshAltStoreViewController never finishing

This commit is contained in:
Riley Testut
2020-03-30 15:23:20 -07:00
parent 45737250a7
commit 4e29c7a38c
4 changed files with 49 additions and 15 deletions

View File

@@ -52,12 +52,12 @@ private extension RefreshAltStoreViewController
switch result
{
case .success: self.completionHandler?(.success(()))
case .failure(let error):
case .failure(let error as NSError):
DispatchQueue.main.async {
sender.progress = nil
sender.isIndicatingActivity = false
let alertController = UIAlertController(title: NSLocalizedString("Failed to Refresh AltStore", comment: ""), message: error.localizedDescription, preferredStyle: .alert)
let alertController = UIAlertController(title: NSLocalizedString("Failed to Refresh AltStore", comment: ""), message: error.localizedFailureReason ?? error.localizedDescription, preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: NSLocalizedString("Try Again", comment: ""), style: .default, handler: { (action) in
refresh()
}))