From 39a27f932a60e83080db53753539df966e5049fd Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 31 Jul 2019 13:54:54 -0700 Subject: [PATCH] [AltStore] Fixes frozen progress when refresh fails --- AltStore/My Apps/MyAppsViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AltStore/My Apps/MyAppsViewController.swift b/AltStore/My Apps/MyAppsViewController.swift index f6c1980a..66f4b1d5 100644 --- a/AltStore/My Apps/MyAppsViewController.swift +++ b/AltStore/My Apps/MyAppsViewController.swift @@ -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") } }