fix confirmation popup not appearing

This commit is contained in:
leminlimez committed 2025-07-18 14:48:43 -04:00
1 parent ad280b1a6b
commit 22a74d5fb8
1 file changed
+4
@@ -45,13 +45,17 @@ class DownloadManager: ObservableObject {
PosterBoardManager.shared.selectedTendies.append(newURL) PosterBoardManager.shared.selectedTendies.append(newURL)
Haptic.shared.notify(.success) Haptic.shared.notify(.success)
UIApplication.shared.dismissAlert(animated: true) UIApplication.shared.dismissAlert(animated: true)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.35, execute: {
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")) 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 { } catch {
DispatchQueue.main.async { DispatchQueue.main.async {
Haptic.shared.notify(.error) Haptic.shared.notify(.error)
UIApplication.shared.dismissAlert(animated: true) UIApplication.shared.dismissAlert(animated: true)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.35, execute: {
UIApplication.shared.alert(title: NSLocalizedString("Could not download wallpaper!", comment: ""), body: error.localizedDescription) UIApplication.shared.alert(title: NSLocalizedString("Could not download wallpaper!", comment: ""), body: error.localizedDescription)
})
} }
} }
} }