mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-23 06:46:03 +00:00
Refactoring
This commit is contained in:
1 parent
0c3ccc278a
commit
46b45cd3f7
1 file changed
+6
-6
@@ -91,7 +91,7 @@ struct GetPlusView: View {
|
|||||||
}
|
}
|
||||||
.frame(width: 400, height: 200)
|
.frame(width: 400, height: 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func restorePurchases() {
|
func restorePurchases() {
|
||||||
|
|
||||||
@@ -126,10 +126,10 @@ struct GetPlusView: View {
|
|||||||
|
|
||||||
func restoreFailed(message: String) {
|
func restoreFailed(message: String) {
|
||||||
|
|
||||||
#if targetEnvironment(simulator)
|
#if targetEnvironment(simulator)
|
||||||
isPlusVersion = true
|
isPlusVersion = true
|
||||||
dismissView()
|
dismissView()
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// now, try to convert from old version
|
// now, try to convert from old version
|
||||||
IAPConverter.shared.restoreIAPfromPreviousPurchase { success in
|
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):
|
case .failure(let error):
|
||||||
errorText = error.localizedDescription
|
errorText = error.localizedDescription
|
||||||
|
|
||||||
if(shouldBuy){
|
if shouldBuy {
|
||||||
warning = true
|
warning = true
|
||||||
}
|
}
|
||||||
|
|
||||||
withAnimation{
|
withAnimation {
|
||||||
buying = false
|
buying = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user