update
add missing strings add height back to purchase view button on year and month
This commit is contained in:
@@ -17,8 +17,13 @@ struct PurchaseButtonView: View {
|
||||
|
||||
private let showCountdownTimer: Bool
|
||||
private let showManageSubClosure: (() -> Void)?
|
||||
|
||||
public init(iapManager: IAPManager, showManageSubClosure: (() -> Void)? = nil, showCountdownTimer: Bool = false) {
|
||||
private let height: CGFloat?
|
||||
|
||||
public init(height: CGFloat? = nil,
|
||||
iapManager: IAPManager,
|
||||
showManageSubClosure: (() -> Void)? = nil,
|
||||
showCountdownTimer: Bool = false) {
|
||||
self.height = height
|
||||
self.showManageSubClosure = showManageSubClosure
|
||||
self.iapManager = iapManager
|
||||
self.showCountdownTimer = showCountdownTimer
|
||||
@@ -31,8 +36,14 @@ struct PurchaseButtonView: View {
|
||||
switch iapManager.showIAPWarning {
|
||||
case true:
|
||||
VStack {
|
||||
buyOptionsView
|
||||
.background(theme.currentTheme.secondaryBGColor)
|
||||
if let height = self.height {
|
||||
buyOptionsView
|
||||
.background(theme.currentTheme.secondaryBGColor)
|
||||
.frame(height: height)
|
||||
} else {
|
||||
buyOptionsView
|
||||
.background(theme.currentTheme.secondaryBGColor)
|
||||
}
|
||||
}
|
||||
case false:
|
||||
subscribedView
|
||||
@@ -122,12 +133,13 @@ struct PurchaseButtonView: View {
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
Text(String(localized: "purchase_view_current_why_subscribe"))
|
||||
.font(.body)
|
||||
.bold()
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
Text(String(localized: "purchase_view_current_why_subscribe"))
|
||||
.font(.body)
|
||||
.bold()
|
||||
.foregroundColor(textColor)
|
||||
|
||||
HStack {
|
||||
ForEach(iapManager.sortedSubscriptionKeysByPriceOptions) { product in
|
||||
Button(action: {
|
||||
|
||||
Reference in New Issue
Block a user