loading and error handling

This commit is contained in:
leminlimez committed 2025-07-11 11:15:52 -04:00
1 parent edde7ddb0c
commit e932b82515
4 files changed
+68 -4

No files matched your search

@@ -43,13 +43,13 @@ class DownloadManager: ObservableObject {
DispatchQueue.main.async {
PosterBoardManager.shared.selectedTendies.append(newURL)
Haptic.shared.notify(.success)
UIApplication.shared.dismissAlert(animated: false)
UIApplication.shared.dismissAlert(animated: true)
UIApplication.shared.alert(title: NSLocalizedString("Successfully downloaded wallpaper!", comment: ""), body: NSLocalizedString("Your downloaded .tendies will be on the Home page.", comment: "after successfully downloading tendies"))
}
} catch {
DispatchQueue.main.async {
Haptic.shared.notify(.error)
UIApplication.shared.dismissAlert(animated: false)
UIApplication.shared.dismissAlert(animated: true)
UIApplication.shared.alert(title: NSLocalizedString("Could not download wallpaper!", comment: ""), body: error.localizedDescription)
}
}