From 46b45cd3f74185a1e71748bac7580b5c180a619a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6ttger?= Date: Sat, 1 Mar 2025 18:58:02 +0100 Subject: [PATCH] Refactoring --- NearDrop/IAP/GetPlusView.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NearDrop/IAP/GetPlusView.swift b/NearDrop/IAP/GetPlusView.swift index ac1e6fe..46b034a 100644 --- a/NearDrop/IAP/GetPlusView.swift +++ b/NearDrop/IAP/GetPlusView.swift @@ -91,7 +91,7 @@ struct GetPlusView: View { } .frame(width: 400, height: 200) } - + func restorePurchases() { @@ -126,10 +126,10 @@ struct GetPlusView: View { func restoreFailed(message: String) { - #if targetEnvironment(simulator) +#if targetEnvironment(simulator) isPlusVersion = true dismissView() - #else +#else // now, try to convert from old version IAPConverter.shared.restoreIAPfromPreviousPurchase { success in @@ -153,7 +153,7 @@ struct GetPlusView: View { } } } - #endif +#endif } } @@ -215,11 +215,11 @@ struct GetPlusView: View { case .failure(let error): errorText = error.localizedDescription - if(shouldBuy){ + if shouldBuy { warning = true } - withAnimation{ + withAnimation { buying = false } }