Skip to content

Commit

Permalink
PaywallView: hide mode parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Aug 22, 2023
1 parent 39e5c9a commit caabcd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions RevenueCatUI/PaywallView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ public struct PaywallView: View {
/// - Note: If loading the current `Offering` fails (if the user is offline, for example),
/// an error will be displayed.
/// - Warning: `Purchases` must have been configured prior to displaying it.
/// If you want to handle that, you can use ``init(offering:mode:)`` instead.
/// If you want to handle that, you can use ``init(offering:)`` instead.
public init(
mode: PaywallViewMode = .default,
fonts: PaywallFontProvider = DefaultPaywallFontProvider()
) {
self.init(
offering: nil,
mode: mode,
fonts: fonts,
introEligibility: .default(),
purchaseHandler: .default()
Expand All @@ -46,12 +44,10 @@ public struct PaywallView: View {
/// - Warning: `Purchases` must have been configured prior to displaying it.
public init(
offering: Offering,
mode: PaywallViewMode = .default,
fonts: PaywallFontProvider = DefaultPaywallFontProvider()
) {
self.init(
offering: offering,
mode: mode,
fonts: fonts,
introEligibility: .default(),
purchaseHandler: .default()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ struct App: View {
@ViewBuilder
var content: some View {
PaywallView()
PaywallView(mode: .fullScreen)
PaywallView(fonts: self.fonts)
PaywallView(mode: .fullScreen, fonts: self.fonts)
PaywallView(offering: self.offering)
PaywallView(offering: self.offering, mode: .fullScreen)
PaywallView(offering: self.offering, fonts: self.fonts)
PaywallView(offering: self.offering, mode: .fullScreen, fonts: self.fonts)
}

@ViewBuilder
Expand Down

0 comments on commit caabcd0

Please sign in to comment.