iap work
This commit is contained in:
@@ -146,12 +146,26 @@ struct SettingsView: View {
|
||||
private var subscriptionInfoView: some View {
|
||||
ZStack {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
PurchaseButtonView(height: iapManager.currentSubscription != nil ? 300 : 200, iapManager: iapManager, showManageSubClosure: {
|
||||
Task {
|
||||
await
|
||||
self.showManageSubscription()
|
||||
VStack {
|
||||
PurchaseButtonView(height: iapManager.currentSubscription != nil ? 300 : 200, iapManager: iapManager, showManageSubClosure: {
|
||||
Task {
|
||||
await
|
||||
self.showManageSubscription()
|
||||
}
|
||||
}, showCountdownTimer: true)
|
||||
|
||||
if iapManager.showIAPWarning {
|
||||
Button(action: {
|
||||
Task {
|
||||
await iapManager.restore()
|
||||
}
|
||||
}, label: {
|
||||
Text(String(localized: "purchase_view_restore"))
|
||||
.font(.title3)
|
||||
.padding([.top, .bottom])
|
||||
})
|
||||
}
|
||||
}, showCountdownTimer: true)
|
||||
}
|
||||
}
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
}
|
||||
@@ -228,6 +242,7 @@ struct SettingsView: View {
|
||||
tmpDate = Calendar.current.date(byAdding: .minute, value: -59, to: tmpDate)!
|
||||
tmpDate = Calendar.current.date(byAdding: .second, value: -45, to: tmpDate)!
|
||||
firstLaunchDate = tmpDate
|
||||
iapManager.updateEverything()
|
||||
}, label: {
|
||||
Text("Set first launch date back 29 days, 23 hrs, 45 seconds")
|
||||
.foregroundColor(textColor)
|
||||
@@ -243,6 +258,7 @@ struct SettingsView: View {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
Button(action: {
|
||||
firstLaunchDate = Date()
|
||||
iapManager.updateEverything()
|
||||
}, label: {
|
||||
Text("Reset luanch date to current date")
|
||||
.foregroundColor(textColor)
|
||||
|
||||
Reference in New Issue
Block a user