From e1f90ad96d6810a968a23347663248ef7537f455 Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Wed, 12 Jun 2024 23:58:24 +0300 Subject: [PATCH] improvement: Add a note explaining how premium subscription works --- .../commonMain/composeResources/values/strings.xml | 1 + .../home/settings/component/SettingSubscriptions.kt | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/common/src/commonMain/composeResources/values/strings.xml b/common/src/commonMain/composeResources/values/strings.xml index 2dee5f60..e897154f 100644 --- a/common/src/commonMain/composeResources/values/strings.xml +++ b/common/src/commonMain/composeResources/values/strings.xml @@ -1071,6 +1071,7 @@ About Keyguard membership The Premium unlocks extra features and funds a development of the app. Thank you for supporting us! ❤️ Subscriptions + Your subscription will renew 24 hours before it expires and your Google Play account will be automatically charged at that time. You can turn auto-renewal on or off, and you can cancel your subscription at any time on Google Play. If you've never subscribed, you may be eligible for a free trial. You won't be charged if you cancel before the end of your free trial. Products Failed to load a list of subscriptions Failed to load a list of products diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/settings/component/SettingSubscriptions.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/settings/component/SettingSubscriptions.kt index d880434e..676c8c36 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/settings/component/SettingSubscriptions.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/settings/component/SettingSubscriptions.kt @@ -47,10 +47,12 @@ import com.artemchep.keyguard.ui.ExpandedIfNotEmpty import com.artemchep.keyguard.ui.FlatItemLayout import com.artemchep.keyguard.ui.FlatItemTextContent import com.artemchep.keyguard.ui.FlatSimpleNote +import com.artemchep.keyguard.ui.MediumEmphasisAlpha import com.artemchep.keyguard.ui.SimpleNote import com.artemchep.keyguard.ui.icons.ChevronIcon import com.artemchep.keyguard.ui.shimmer.shimmer import com.artemchep.keyguard.ui.theme.Dimens +import com.artemchep.keyguard.ui.theme.combineAlpha import org.jetbrains.compose.resources.stringResource import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine @@ -166,6 +168,15 @@ private fun SettingSubscriptions( } }, ) + Text( + stringResource(Res.string.pref_item_premium_membership_section_subscriptions_note), + modifier = Modifier + .padding(top = 16.dp) + .padding(horizontal = Dimens.horizontalPadding), + style = MaterialTheme.typography.bodyMedium, + color = LocalContentColor.current + .combineAlpha(MediumEmphasisAlpha), + ) Section(text = stringResource(Res.string.pref_item_premium_membership_section_products_title)) loadableProducts.fold( ifLoading = {