diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt index 4997215d..58c55593 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt @@ -43,9 +43,6 @@ class SettingsActivity : AppCompatActivity() { } } val isOrWasThankYouInstalled = onEventValue { context.isOrWasThankYouInstalled() } - val lockedCustomizeColorText by remember(isOrWasThankYouInstalled) { - derivedStateOf { if (isOrWasThankYouInstalled) null else getCustomizeColorsString() } - } val displayLanguage = remember { Locale.getDefault().displayLanguage } SettingsScreen( displayLanguage = displayLanguage, @@ -73,7 +70,7 @@ class SettingsActivity : AppCompatActivity() { applicationContext.calculatorDB.deleteHistory() } }, - lockedCustomizeColorText = lockedCustomizeColorText + lockedCustomizeColorText = getCustomizeColorsString() ) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/SettingsScreen.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/SettingsScreen.kt index 2d0724e0..64df13e8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/SettingsScreen.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/SettingsScreen.kt @@ -32,7 +32,7 @@ internal fun SettingsScreen( onSetupLanguagePress: () -> Unit, useCommaAsDecimalMarkFlow: Boolean, onUseCommaAsDecimalMarkFlow: (Boolean) -> Unit, - lockedCustomizeColorText: String?, + lockedCustomizeColorText: String, displayLanguage: String ) { SettingsScaffold(title = stringResource(id = R.string.settings), goBack = goBack) { @@ -40,10 +40,9 @@ internal fun SettingsScreen( SettingsTitleTextComponent(text = stringResource(id = R.string.color_customization)) }) { SettingsPreferenceComponent( - preferenceTitle = stringResource(id = R.string.customize_colors), + preferenceTitle = lockedCustomizeColorText, doOnPreferenceClick = customizeColors, isPreferenceEnabled = isOrWasThankYouInstalled, - preferenceSummary = lockedCustomizeColorText ) SettingsPreferenceComponent( preferenceTitle = stringResource(id = R.string.customize_widget_colors), @@ -106,7 +105,7 @@ private fun SettingsScreenPreview() { onPreventPhoneFromSleeping = {}, vibrateOnButtonPressFlow = false, onVibrateOnButtonPressFlow = {}, - isOrWasThankYouInstalled = false, + isOrWasThankYouInstalled = true, onThankYou = {}, isUseEnglishEnabled = false, isUseEnglishChecked = false, @@ -114,7 +113,7 @@ private fun SettingsScreenPreview() { onSetupLanguagePress = {}, useCommaAsDecimalMarkFlow = false, onUseCommaAsDecimalMarkFlow = {}, - lockedCustomizeColorText = null, + lockedCustomizeColorText = "Customize Colors", displayLanguage = "English" ) }