[AltStore] Fixes frozen progress when refresh fails

This commit is contained in:
Riley Testut
2019-07-31 13:54:54 -07:00
parent 98b474edaf
commit 39a27f932a

View File

@@ -436,6 +436,14 @@ private extension MyAppsViewController
}
self.refresh([installedApp]) { (result) in
// If an error occured, reload the section so the progress bar is no longer visible.
if result.error != nil || result.value?.values.contains(where: { $0.error != nil }) == true
{
DispatchQueue.main.async {
self.collectionView.reloadSections(IndexSet(integer: Section.installedApps.rawValue))
}
}
print("Finished refreshing with result:", result.error?.localizedDescription ?? "success")
}
}