From bd560688d539fe5a84e14838d080ace1e834c1c9 Mon Sep 17 00:00:00 2001 From: NachoSoto Date: Fri, 20 Oct 2023 15:03:21 -0700 Subject: [PATCH] `Paywalls`: improve error handling --- .../paywallstester/PaywallTesterApp.kt | 6 ++- .../screens/main/paywalls/PaywallsScreen.kt | 2 +- .../ui/screens/paywall/PaywallScreen.kt | 3 +- .../paywallfooter/PaywallFooterScreen.kt | 3 +- .../ui/revenuecatui/InternalPaywall.kt | 40 +++++++++++++++++-- .../purchases/ui/revenuecatui/Paywall.kt | 5 +-- .../ui/revenuecatui/PaywallDialogOptions.kt | 2 +- .../ui/revenuecatui/PaywallFooter.kt | 6 ++- .../ui/revenuecatui/PaywallOptions.kt | 8 +++- .../revenuecatui/activity/PaywallActivity.kt | 2 +- .../extensions/PaywallDataExtensions.kt | 2 +- .../ui/revenuecatui/templates/Template1.kt | 14 +++---- .../ui/revenuecatui/templates/Template2.kt | 6 +-- .../ui/revenuecatui/templates/Template3.kt | 6 +-- .../src/main/res/values-ar/strings.xml | 1 + .../src/main/res/values-bg/strings.xml | 1 + .../src/main/res/values-ca/strings.xml | 1 + .../src/main/res/values-cs/strings.xml | 1 + .../src/main/res/values-da/strings.xml | 1 + .../src/main/res/values-de/strings.xml | 1 + .../src/main/res/values-el/strings.xml | 1 + .../src/main/res/values-es/strings.xml | 1 + .../src/main/res/values-fi/strings.xml | 1 + .../src/main/res/values-fr/strings.xml | 1 + .../src/main/res/values-he/strings.xml | 1 + .../src/main/res/values-hi/strings.xml | 1 + .../src/main/res/values-hr/strings.xml | 1 + .../src/main/res/values-hu/strings.xml | 1 + .../src/main/res/values-id/strings.xml | 1 + .../src/main/res/values-it/strings.xml | 1 + .../src/main/res/values-ja/strings.xml | 1 + .../src/main/res/values-kk/strings.xml | 1 + .../src/main/res/values-ko/strings.xml | 1 + .../src/main/res/values-ms/strings.xml | 1 + .../src/main/res/values-nl/strings.xml | 1 + .../src/main/res/values-no/strings.xml | 1 + .../src/main/res/values-pl/strings.xml | 1 + .../src/main/res/values-pt/strings.xml | 1 + .../src/main/res/values-ro/strings.xml | 1 + .../src/main/res/values-ru/strings.xml | 1 + .../src/main/res/values-sk/strings.xml | 1 + .../src/main/res/values-sv/strings.xml | 1 + .../src/main/res/values-th/strings.xml | 1 + .../src/main/res/values-tr/strings.xml | 1 + .../src/main/res/values-uk/strings.xml | 1 + .../src/main/res/values-vi/strings.xml | 1 + .../src/main/res/values-zh-rHK/strings.xml | 1 + .../src/main/res/values-zh-rTW/strings.xml | 1 + .../src/main/res/values/strings.xml | 1 + .../revenuecatui/data/PaywallViewModelTest.kt | 2 +- 50 files changed, 109 insertions(+), 33 deletions(-) diff --git a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/PaywallTesterApp.kt b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/PaywallTesterApp.kt index 5c4c5da1c6..4c9fb7d38f 100644 --- a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/PaywallTesterApp.kt +++ b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/PaywallTesterApp.kt @@ -52,7 +52,7 @@ private fun AppNavHost( route = AppScreen.Paywall.route.plus("/{${PaywallScreenViewModel.OFFERING_ID_KEY}}"), arguments = listOf(navArgument(PaywallScreenViewModel.OFFERING_ID_KEY) { type = NavType.StringType }), ) { - PaywallScreen() + PaywallScreen(dismissRequest = navController::popBackStack) } composable( route = AppScreen.PaywallFooter.route @@ -68,7 +68,9 @@ private fun AppNavHost( }, ), ) { - PaywallFooterScreen() + PaywallFooterScreen( + dismissRequest = navController::popBackStack, + ) } } } diff --git a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/main/paywalls/PaywallsScreen.kt b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/main/paywalls/PaywallsScreen.kt index c4df72b268..154cab4380 100644 --- a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/main/paywalls/PaywallsScreen.kt +++ b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/main/paywalls/PaywallsScreen.kt @@ -117,7 +117,7 @@ private fun FooterDialog(currentState: DisplayPaywallState.Footer, onDismiss: () Scaffold { scaffoldPadding -> Box(modifier = Modifier.padding(scaffoldPadding)) { PaywallFooter( - options = PaywallOptions.Builder() + options = PaywallOptions.Builder(dismissRequest = onDismiss) .setOffering(currentState.offering) .setListener(PaywallListenerImpl(onDismiss)) .build(), diff --git a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywall/PaywallScreen.kt b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywall/PaywallScreen.kt index 7b755cd8f5..9c1bf2569b 100644 --- a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywall/PaywallScreen.kt +++ b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywall/PaywallScreen.kt @@ -17,6 +17,7 @@ import com.revenuecat.purchases.ui.revenuecatui.PaywallOptions @Composable fun PaywallScreen( viewModel: PaywallScreenViewModel = viewModel(), + dismissRequest: () -> Unit, ) { Column( modifier = Modifier.fillMaxSize(), @@ -32,7 +33,7 @@ fun PaywallScreen( } is PaywallScreenState.Loaded -> { Paywall( - PaywallOptions.Builder() + PaywallOptions.Builder(dismissRequest) .setOffering(state.offering) .setListener(viewModel) .build(), diff --git a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywallfooter/PaywallFooterScreen.kt b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywallfooter/PaywallFooterScreen.kt index a0e49a4910..0d4f37b13b 100644 --- a/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywallfooter/PaywallFooterScreen.kt +++ b/examples/paywall-tester/src/main/java/com/revenuecat/paywallstester/ui/screens/paywallfooter/PaywallFooterScreen.kt @@ -25,6 +25,7 @@ import com.revenuecat.purchases.ui.revenuecatui.PaywallOptions @Composable fun PaywallFooterScreen( viewModel: PaywallScreenViewModel = viewModel(), + dismissRequest: () -> Unit, ) { Column( modifier = Modifier.fillMaxSize(), @@ -40,7 +41,7 @@ fun PaywallFooterScreen( } is PaywallScreenState.Loaded -> { PaywallFooter( - options = PaywallOptions.Builder() + options = PaywallOptions.Builder(dismissRequest) .setOffering(state.offering) .setListener(viewModel) .build(), diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/InternalPaywall.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/InternalPaywall.kt index e1df90e3c1..b9201e6834 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/InternalPaywall.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/InternalPaywall.kt @@ -4,13 +4,19 @@ import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text +import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign import androidx.lifecycle.viewmodel.compose.viewModel import com.revenuecat.purchases.ui.revenuecatui.data.PaywallState import com.revenuecat.purchases.ui.revenuecatui.data.PaywallViewModel @@ -33,8 +39,7 @@ internal fun InternalPaywall( ) { PaywallTheme(fontProvider = options.fontProvider) { viewModel.refreshStateIfLocaleChanged() - val colors = MaterialTheme.colorScheme - viewModel.refreshStateIfColorsChanged(colors) + viewModel.refreshStateIfColorsChanged(MaterialTheme.colorScheme) when (val state = viewModel.state.collectAsState().value) { is PaywallState.Loading -> { @@ -42,7 +47,12 @@ internal fun InternalPaywall( } is PaywallState.Error -> { - Text(text = "Error: ${state.errorMessage}") + LoadingPaywall(mode = options.mode) + + ErrorDialog( + dismissRequest = options.dismissRequest, + error = state.errorMessage, + ) } is PaywallState.Loaded -> { @@ -104,3 +114,27 @@ private fun getPaywallViewModel( ), ) } + +@Composable +private fun ErrorDialog( + dismissRequest: () -> Unit, + error: String, +) { + AlertDialog( + onDismissRequest = dismissRequest, + confirmButton = { + TextButton( + onClick = dismissRequest, + ) { + Text( + text = stringResource(id = R.string.OK), + textAlign = TextAlign.Center + ) + } + }, + icon = { Icon(painter = painterResource(id = R.drawable.error), contentDescription = null) }, + text = { + Text(text = error) + }, + ) +} diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/Paywall.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/Paywall.kt index 672e36a392..be87d6f44b 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/Paywall.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/Paywall.kt @@ -6,10 +6,7 @@ import androidx.compose.runtime.Composable * Composable offering a full screen Paywall UI configured from the RevenueCat dashboard. * @param options The options to configure the [Paywall] if needed. */ -@Suppress("unused") @Composable -fun Paywall( - options: PaywallOptions = PaywallOptions.Builder().build(), -) { +fun Paywall(options: PaywallOptions) { InternalPaywall(options) } diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallDialogOptions.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallDialogOptions.kt index a014415a5d..d6047b65b9 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallDialogOptions.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallDialogOptions.kt @@ -24,7 +24,7 @@ class PaywallDialogOptions(builder: Builder) { } internal fun toPaywallOptions(): PaywallOptions { - return PaywallOptions.Builder() + return PaywallOptions.Builder(dismissRequest) .setOffering(offering) .setShouldDisplayDismissButton(shouldDisplayDismissButton) .setFontProvider(fontProvider) diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallFooter.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallFooter.kt index e9e878b5ad..c3d477971a 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallFooter.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallFooter.kt @@ -26,7 +26,7 @@ import androidx.compose.ui.tooling.preview.Preview */ @Composable fun PaywallFooter( - options: PaywallOptions = PaywallOptions.Builder().build(), + options: PaywallOptions, condensed: Boolean = false, mainContent: @Composable (PaddingValues) -> Unit, ) { @@ -52,7 +52,9 @@ fun PaywallFooter( @Preview(showBackground = true) @Composable private fun PaywallFooterPreview() { - PaywallFooter { + PaywallFooter( + options = PaywallOptions.Builder(dismissRequest = {}).build(), + ) { Column( modifier = Modifier .fillMaxWidth() diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallOptions.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallOptions.kt index c29b67cc7e..20d90968e3 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallOptions.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/PaywallOptions.kt @@ -26,19 +26,23 @@ internal sealed class OfferingSelection { class PaywallOptions(builder: Builder) { internal val offeringSelection: OfferingSelection - val shouldDisplayDismissButton: Boolean + private val shouldDisplayDismissButton: Boolean val fontProvider: FontProvider? val listener: PaywallListener? internal var mode: PaywallMode = PaywallMode.default + val dismissRequest: () -> Unit init { this.offeringSelection = builder.offeringSelection this.shouldDisplayDismissButton = builder.shouldDisplayDismissButton this.fontProvider = builder.fontProvider this.listener = builder.listener + this.dismissRequest = builder.dismissRequest } - class Builder { + class Builder( + internal val dismissRequest: () -> Unit, + ) { internal var offeringSelection: OfferingSelection = OfferingSelection.None internal var shouldDisplayDismissButton: Boolean = false internal var fontProvider: FontProvider? = null diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/activity/PaywallActivity.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/activity/PaywallActivity.kt index 8e8a93c229..46f4a80140 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/activity/PaywallActivity.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/activity/PaywallActivity.kt @@ -74,7 +74,7 @@ internal class PaywallActivity : ComponentActivity(), PaywallListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - val paywallOptions = PaywallOptions.Builder() + val paywallOptions = PaywallOptions.Builder(dismissRequest = ::finish) .setOfferingId(getArgs()?.offeringId) .setFontProvider(getFontProvider()) .setListener(this) diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/extensions/PaywallDataExtensions.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/extensions/PaywallDataExtensions.kt index 11b5ae2665..ade9f1decf 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/extensions/PaywallDataExtensions.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/extensions/PaywallDataExtensions.kt @@ -141,7 +141,7 @@ internal fun DefaultPaywallPreview() { serverDescription = "", ) InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(offering = template2Offering), ) } diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template1.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template1.kt index 6e81205e6d..1818ac04f5 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template1.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template1.kt @@ -174,34 +174,34 @@ private object Template1UIConstants { @Preview(showBackground = true) @Composable -internal fun Template1PaywallPreview() { +private fun Template1PaywallPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(offering = TestData.template1Offering), ) } @Preview(showBackground = true) @Composable -internal fun Template1FooterPaywallPreview() { +private fun Template1FooterPaywallPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(mode = PaywallMode.FOOTER, offering = TestData.template1Offering), ) } @Preview(showBackground = true) @Composable -internal fun Template1CondensedFooterPaywallPreview() { +private fun Template1CondensedFooterPaywallPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(mode = PaywallMode.FOOTER_CONDENSED, offering = TestData.template1Offering), ) } @Preview(heightDp = 700, widthDp = 400) @Composable -internal fun CircleMaskPreview() { +private fun CircleMaskPreview() { Box { Box( modifier = Modifier diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template2.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template2.kt index 126c843de3..e90242c27e 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template2.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template2.kt @@ -290,7 +290,7 @@ private fun CheckmarkBox(isSelected: Boolean, colors: TemplateConfiguration.Colo @Composable private fun Template2PaywallPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(offering = TestData.template2Offering), ) } @@ -300,7 +300,7 @@ private fun Template2PaywallPreview() { @Composable private fun Template2PaywallFooterPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(mode = PaywallMode.FOOTER, offering = TestData.template2Offering), ) } @@ -310,7 +310,7 @@ private fun Template2PaywallFooterPreview() { @Composable private fun Template2PaywallFooterCondensedPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(mode = PaywallMode.FOOTER_CONDENSED, offering = TestData.template2Offering), ) } diff --git a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template3.kt b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template3.kt index 9c9d6cc857..ec5152fd13 100644 --- a/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template3.kt +++ b/ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/templates/Template3.kt @@ -182,7 +182,7 @@ private fun Feature( @Composable private fun Template3Preview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(offering = TestData.template3Offering), ) } @@ -191,7 +191,7 @@ private fun Template3Preview() { @Composable private fun Template3FooterPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(mode = PaywallMode.FOOTER, offering = TestData.template3Offering), ) } @@ -200,7 +200,7 @@ private fun Template3FooterPreview() { @Composable private fun Template3CondensedFooterPreview() { InternalPaywall( - options = PaywallOptions.Builder().build(), + options = PaywallOptions.Builder(dismissRequest = {}).build(), viewModel = MockViewModel(mode = PaywallMode.FOOTER_CONDENSED, offering = TestData.template3Offering), ) } diff --git a/ui/revenuecatui/src/main/res/values-ar/strings.xml b/ui/revenuecatui/src/main/res/values-ar/strings.xml index 5a9f1adddd..a1bacba3e2 100644 --- a/ui/revenuecatui/src/main/res/values-ar/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ar/strings.xml @@ -1,5 +1,6 @@ + نعم كل الاشتراكات خصوصية سياسة الخصوصية diff --git a/ui/revenuecatui/src/main/res/values-bg/strings.xml b/ui/revenuecatui/src/main/res/values-bg/strings.xml index dd42127d2f..d18cf8395c 100644 --- a/ui/revenuecatui/src/main/res/values-bg/strings.xml +++ b/ui/revenuecatui/src/main/res/values-bg/strings.xml @@ -1,5 +1,6 @@ + Добре Всички абонаменти поверителност Политика за поверителност diff --git a/ui/revenuecatui/src/main/res/values-ca/strings.xml b/ui/revenuecatui/src/main/res/values-ca/strings.xml index 47521f40ca..4739028619 100644 --- a/ui/revenuecatui/src/main/res/values-ca/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ca/strings.xml @@ -1,5 +1,6 @@ + D\'acord Totes les subscripcions Privadesa Política de privacitat diff --git a/ui/revenuecatui/src/main/res/values-cs/strings.xml b/ui/revenuecatui/src/main/res/values-cs/strings.xml index 7d2260372f..ff3d2c9562 100644 --- a/ui/revenuecatui/src/main/res/values-cs/strings.xml +++ b/ui/revenuecatui/src/main/res/values-cs/strings.xml @@ -1,5 +1,6 @@ + OK Všechna předplatná Soukromí Zásady ochrany osobních údajů diff --git a/ui/revenuecatui/src/main/res/values-da/strings.xml b/ui/revenuecatui/src/main/res/values-da/strings.xml index e8ec6f6119..4a28266586 100644 --- a/ui/revenuecatui/src/main/res/values-da/strings.xml +++ b/ui/revenuecatui/src/main/res/values-da/strings.xml @@ -1,5 +1,6 @@ + Okay Alle abonnementer Privatliv Fortrolighedspolitik diff --git a/ui/revenuecatui/src/main/res/values-de/strings.xml b/ui/revenuecatui/src/main/res/values-de/strings.xml index 3671bb4976..4ce687e5ed 100644 --- a/ui/revenuecatui/src/main/res/values-de/strings.xml +++ b/ui/revenuecatui/src/main/res/values-de/strings.xml @@ -1,5 +1,6 @@ + OK Alle Abonnements Privatsphäre Datenschutzrichtlinie diff --git a/ui/revenuecatui/src/main/res/values-el/strings.xml b/ui/revenuecatui/src/main/res/values-el/strings.xml index 2370d2872e..329873fcff 100644 --- a/ui/revenuecatui/src/main/res/values-el/strings.xml +++ b/ui/revenuecatui/src/main/res/values-el/strings.xml @@ -1,5 +1,6 @@ + Εντάξει Όλες οι συνδρομές Μυστικότητα Πολιτική απορρήτου diff --git a/ui/revenuecatui/src/main/res/values-es/strings.xml b/ui/revenuecatui/src/main/res/values-es/strings.xml index f59fcd4217..19790543b2 100644 --- a/ui/revenuecatui/src/main/res/values-es/strings.xml +++ b/ui/revenuecatui/src/main/res/values-es/strings.xml @@ -1,5 +1,6 @@ + OK Restaurar las compras Restaurar Términos y condiciones diff --git a/ui/revenuecatui/src/main/res/values-fi/strings.xml b/ui/revenuecatui/src/main/res/values-fi/strings.xml index 4cabd889f5..585d8f89cf 100644 --- a/ui/revenuecatui/src/main/res/values-fi/strings.xml +++ b/ui/revenuecatui/src/main/res/values-fi/strings.xml @@ -1,5 +1,6 @@ + OK Kaikki tilaukset Yksityisyys Tietosuojakäytäntö diff --git a/ui/revenuecatui/src/main/res/values-fr/strings.xml b/ui/revenuecatui/src/main/res/values-fr/strings.xml index 20631455e8..257d276f3b 100644 --- a/ui/revenuecatui/src/main/res/values-fr/strings.xml +++ b/ui/revenuecatui/src/main/res/values-fr/strings.xml @@ -1,5 +1,6 @@ + D\'ACCORD Confidentialité Politique de confidentialité Restaurer diff --git a/ui/revenuecatui/src/main/res/values-he/strings.xml b/ui/revenuecatui/src/main/res/values-he/strings.xml index b7b2fa8233..ce9e5afd7b 100644 --- a/ui/revenuecatui/src/main/res/values-he/strings.xml +++ b/ui/revenuecatui/src/main/res/values-he/strings.xml @@ -1,5 +1,6 @@ + בסדר כל המנויים פְּרָטִיוּת מדיניות הפרטיות diff --git a/ui/revenuecatui/src/main/res/values-hi/strings.xml b/ui/revenuecatui/src/main/res/values-hi/strings.xml index 76b788d041..90406857ab 100644 --- a/ui/revenuecatui/src/main/res/values-hi/strings.xml +++ b/ui/revenuecatui/src/main/res/values-hi/strings.xml @@ -1,5 +1,6 @@ + ठीक है सभी सदस्यताएँ गोपनीयता गोपनीयता नीति diff --git a/ui/revenuecatui/src/main/res/values-hr/strings.xml b/ui/revenuecatui/src/main/res/values-hr/strings.xml index abbc3c76a2..a98ad17a7d 100644 --- a/ui/revenuecatui/src/main/res/values-hr/strings.xml +++ b/ui/revenuecatui/src/main/res/values-hr/strings.xml @@ -1,5 +1,6 @@ + u redu Sve pretplate Privatnost Politika privatnosti diff --git a/ui/revenuecatui/src/main/res/values-hu/strings.xml b/ui/revenuecatui/src/main/res/values-hu/strings.xml index 36c5b1f2f3..b8849431f3 100644 --- a/ui/revenuecatui/src/main/res/values-hu/strings.xml +++ b/ui/revenuecatui/src/main/res/values-hu/strings.xml @@ -1,5 +1,6 @@ + rendben Minden előfizetés Magánélet Adatvédelmi irányelvek diff --git a/ui/revenuecatui/src/main/res/values-id/strings.xml b/ui/revenuecatui/src/main/res/values-id/strings.xml index b2a3d5d5bd..5ae563b245 100644 --- a/ui/revenuecatui/src/main/res/values-id/strings.xml +++ b/ui/revenuecatui/src/main/res/values-id/strings.xml @@ -1,5 +1,6 @@ + OKE Semua langganan Pribadi Kebijakan pribadi diff --git a/ui/revenuecatui/src/main/res/values-it/strings.xml b/ui/revenuecatui/src/main/res/values-it/strings.xml index fbf47a552a..06686dd748 100644 --- a/ui/revenuecatui/src/main/res/values-it/strings.xml +++ b/ui/revenuecatui/src/main/res/values-it/strings.xml @@ -1,5 +1,6 @@ + OK Tutti gli abbonamenti Riservatezza Politica sulla riservatezza diff --git a/ui/revenuecatui/src/main/res/values-ja/strings.xml b/ui/revenuecatui/src/main/res/values-ja/strings.xml index d45ac08281..157bf57a96 100644 --- a/ui/revenuecatui/src/main/res/values-ja/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ja/strings.xml @@ -1,5 +1,6 @@ + わかりました すべてのサブスクリプション プライバシー プライバシーポリシー diff --git a/ui/revenuecatui/src/main/res/values-kk/strings.xml b/ui/revenuecatui/src/main/res/values-kk/strings.xml index 9404e4867d..f3edb1f391 100644 --- a/ui/revenuecatui/src/main/res/values-kk/strings.xml +++ b/ui/revenuecatui/src/main/res/values-kk/strings.xml @@ -1,5 +1,6 @@ + ЖАРАЙДЫ МА Барлық жазылымдар Құпиялық Құпиялылық саясаты diff --git a/ui/revenuecatui/src/main/res/values-ko/strings.xml b/ui/revenuecatui/src/main/res/values-ko/strings.xml index 02d26d6f66..b6bd345f59 100644 --- a/ui/revenuecatui/src/main/res/values-ko/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ko/strings.xml @@ -1,5 +1,6 @@ + 좋아요 모든 구독 은둔 개인 정보 정책 diff --git a/ui/revenuecatui/src/main/res/values-ms/strings.xml b/ui/revenuecatui/src/main/res/values-ms/strings.xml index 08fdb99c85..d638f5a035 100644 --- a/ui/revenuecatui/src/main/res/values-ms/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ms/strings.xml @@ -1,5 +1,6 @@ + okey Semua langganan Privasi Dasar privasi diff --git a/ui/revenuecatui/src/main/res/values-nl/strings.xml b/ui/revenuecatui/src/main/res/values-nl/strings.xml index 280908eb9d..7d4f9aa197 100644 --- a/ui/revenuecatui/src/main/res/values-nl/strings.xml +++ b/ui/revenuecatui/src/main/res/values-nl/strings.xml @@ -1,5 +1,6 @@ + OK Alle abonnementen Privacy Privacybeleid diff --git a/ui/revenuecatui/src/main/res/values-no/strings.xml b/ui/revenuecatui/src/main/res/values-no/strings.xml index be39cd1a99..a50f05791f 100644 --- a/ui/revenuecatui/src/main/res/values-no/strings.xml +++ b/ui/revenuecatui/src/main/res/values-no/strings.xml @@ -1,5 +1,6 @@ + OK Alle abonnementer Personvern Personvernerklæring diff --git a/ui/revenuecatui/src/main/res/values-pl/strings.xml b/ui/revenuecatui/src/main/res/values-pl/strings.xml index 1d11bc88e7..0b4b1d5cbb 100644 --- a/ui/revenuecatui/src/main/res/values-pl/strings.xml +++ b/ui/revenuecatui/src/main/res/values-pl/strings.xml @@ -1,5 +1,6 @@ + OK Wszystkie subskrypcje Prywatność Polityka prywatności diff --git a/ui/revenuecatui/src/main/res/values-pt/strings.xml b/ui/revenuecatui/src/main/res/values-pt/strings.xml index f45889cd73..382957af28 100644 --- a/ui/revenuecatui/src/main/res/values-pt/strings.xml +++ b/ui/revenuecatui/src/main/res/values-pt/strings.xml @@ -1,5 +1,6 @@ + OK Privacidade Política de Privacidade Restaurar diff --git a/ui/revenuecatui/src/main/res/values-ro/strings.xml b/ui/revenuecatui/src/main/res/values-ro/strings.xml index 951fd1c607..e76ac6e117 100644 --- a/ui/revenuecatui/src/main/res/values-ro/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ro/strings.xml @@ -1,5 +1,6 @@ + Bine Toate abonamentele Confidențialitate Politica de confidențialitate diff --git a/ui/revenuecatui/src/main/res/values-ru/strings.xml b/ui/revenuecatui/src/main/res/values-ru/strings.xml index e8f4547f59..43d548cec3 100644 --- a/ui/revenuecatui/src/main/res/values-ru/strings.xml +++ b/ui/revenuecatui/src/main/res/values-ru/strings.xml @@ -1,5 +1,6 @@ + ХОРОШО Все подписки Конфиденциальность Политика конфиденциальности diff --git a/ui/revenuecatui/src/main/res/values-sk/strings.xml b/ui/revenuecatui/src/main/res/values-sk/strings.xml index a591b4ff80..6cc3043f26 100644 --- a/ui/revenuecatui/src/main/res/values-sk/strings.xml +++ b/ui/revenuecatui/src/main/res/values-sk/strings.xml @@ -1,5 +1,6 @@ + OK Všetky odbery Ochrana osobných údajov Zásady ochrany osobných údajov diff --git a/ui/revenuecatui/src/main/res/values-sv/strings.xml b/ui/revenuecatui/src/main/res/values-sv/strings.xml index 5430b94230..08725e8a59 100644 --- a/ui/revenuecatui/src/main/res/values-sv/strings.xml +++ b/ui/revenuecatui/src/main/res/values-sv/strings.xml @@ -1,5 +1,6 @@ + OK Alla prenumerationer Integritet Integritetspolicy diff --git a/ui/revenuecatui/src/main/res/values-th/strings.xml b/ui/revenuecatui/src/main/res/values-th/strings.xml index 4276aef681..15697cc966 100644 --- a/ui/revenuecatui/src/main/res/values-th/strings.xml +++ b/ui/revenuecatui/src/main/res/values-th/strings.xml @@ -1,5 +1,6 @@ + ตกลง การสมัครทั้งหมด ความเป็นส่วนตัว นโยบายความเป็นส่วนตัว diff --git a/ui/revenuecatui/src/main/res/values-tr/strings.xml b/ui/revenuecatui/src/main/res/values-tr/strings.xml index f18d4d38b6..e357fe3bf8 100644 --- a/ui/revenuecatui/src/main/res/values-tr/strings.xml +++ b/ui/revenuecatui/src/main/res/values-tr/strings.xml @@ -1,5 +1,6 @@ + TAMAM Tüm abonelikler Mahremiyet Gizlilik Politikası diff --git a/ui/revenuecatui/src/main/res/values-uk/strings.xml b/ui/revenuecatui/src/main/res/values-uk/strings.xml index 25a2f9e72e..06169c97b9 100644 --- a/ui/revenuecatui/src/main/res/values-uk/strings.xml +++ b/ui/revenuecatui/src/main/res/values-uk/strings.xml @@ -1,5 +1,6 @@ + в порядку Всі підписки Конфіденційність Політика конфіденційності diff --git a/ui/revenuecatui/src/main/res/values-vi/strings.xml b/ui/revenuecatui/src/main/res/values-vi/strings.xml index 32b39c3f70..994975a1b6 100644 --- a/ui/revenuecatui/src/main/res/values-vi/strings.xml +++ b/ui/revenuecatui/src/main/res/values-vi/strings.xml @@ -1,5 +1,6 @@ + ĐƯỢC RỒI Tất cả đăng ký Sự riêng tư Chính sách bảo mật diff --git a/ui/revenuecatui/src/main/res/values-zh-rHK/strings.xml b/ui/revenuecatui/src/main/res/values-zh-rHK/strings.xml index d6603bda17..f63ba64409 100644 --- a/ui/revenuecatui/src/main/res/values-zh-rHK/strings.xml +++ b/ui/revenuecatui/src/main/res/values-zh-rHK/strings.xml @@ -1,5 +1,6 @@ + 好的 隱私 隱私政策 恢復 diff --git a/ui/revenuecatui/src/main/res/values-zh-rTW/strings.xml b/ui/revenuecatui/src/main/res/values-zh-rTW/strings.xml index d6603bda17..f63ba64409 100644 --- a/ui/revenuecatui/src/main/res/values-zh-rTW/strings.xml +++ b/ui/revenuecatui/src/main/res/values-zh-rTW/strings.xml @@ -1,5 +1,6 @@ + 好的 隱私 隱私政策 恢復 diff --git a/ui/revenuecatui/src/main/res/values/strings.xml b/ui/revenuecatui/src/main/res/values/strings.xml index 69ba3ce5ee..36968227b8 100644 --- a/ui/revenuecatui/src/main/res/values/strings.xml +++ b/ui/revenuecatui/src/main/res/values/strings.xml @@ -1,5 +1,6 @@ + OK Restore purchases Restore Terms and conditions diff --git a/ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/data/PaywallViewModelTest.kt b/ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/data/PaywallViewModelTest.kt index 8da637a186..9b9f509f88 100644 --- a/ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/data/PaywallViewModelTest.kt +++ b/ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/data/PaywallViewModelTest.kt @@ -243,7 +243,7 @@ class PaywallViewModelTest { return PaywallViewModelImpl( MockApplicationContext(), purchases, - PaywallOptions.Builder() + PaywallOptions.Builder(dismissRequest = {}) .setListener(listener) .setOffering(offering) .build(),