-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paywalls
: improved default paywall configuration
#2926
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ extension PaywallData.LocalizedConfiguration { | |
/// A type that can provide necessary information for `VariableHandler` to replace variable content in strings. | ||
protocol VariableDataProvider { | ||
|
||
var applicationName: String { get } | ||
|
||
var isMonthly: Bool { get } | ||
|
||
var localizedPrice: String { get } | ||
|
@@ -85,6 +87,7 @@ private extension VariableDataProvider { | |
|
||
func value(for variableName: String, locale: Locale) -> String { | ||
switch variableName { | ||
case "app_name": return self.applicationName | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made this a "secret" variable so the default template can display the app name as a title. Thoughts @RevenueCat/cashnip? |
||
case "price": return self.localizedPrice | ||
case "price_per_month": return self.localizedPricePerMonth | ||
case "total_price_and_per_month": | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly required for this PR but updating this now.