Skip to content

Commit

Permalink
Paywalls: fixed template 2 + .condensedFooter + iPad (#3185)
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Sep 14, 2023
1 parent efa2ad1 commit 7516a28
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions RevenueCatUI/Templates/Template2View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct Template2View: TemplateViewType {
@ViewBuilder
var content: some View {
VStack(spacing: self.defaultVerticalPaddingLength) {
// Avoid unnecessary spacing, except for iOS 15 because SwiftuI breaks the layout.
// Avoid unnecessary spacing, except for iOS 15 because SwiftUI breaks the layout.
Spacer(minLength: VersionDetector.iOS15 ? nil : 0)

self.scrollableContent
Expand All @@ -71,7 +71,13 @@ struct Template2View: TemplateViewType {
.animation(Constants.fastAnimation, value: self.selectedPackage)
.multilineTextAlignment(.center)
.frame(maxHeight: .infinity)
.padding(.top, self.defaultVerticalPaddingLength)
.padding(
.top,
self.displayingAllPlans
? self.defaultVerticalPaddingLength
// Compensate for additional padding on condensed mode + iPad
: self.defaultVerticalPaddingLength.map { $0 * -1 }
)
}

private var scrollableContent: some View {
Expand Down

0 comments on commit 7516a28

Please sign in to comment.