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 80b90461..bdc61ad7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt @@ -84,7 +84,7 @@ class SettingsActivity : AppCompatActivity() { private fun getFeatureLockedDialogState() = rememberAlertDialogState().apply { DialogMember { - FeatureLockedAlertDialog(alertDialogState = this, callback = {}) + FeatureLockedAlertDialog(alertDialogState = this, cancelCallback = {}) } } 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 7e75f07c..835865cf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/SettingsScreen.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/SettingsScreen.kt @@ -8,11 +8,11 @@ import com.simplemobiletools.commons.R import com.simplemobiletools.commons.compose.alert_dialog.AlertDialogState import com.simplemobiletools.commons.compose.alert_dialog.rememberAlertDialogState import com.simplemobiletools.commons.compose.extensions.MyDevices +import com.simplemobiletools.commons.compose.lists.SimpleColumnScaffold import com.simplemobiletools.commons.compose.settings.SettingsCheckBoxComponent import com.simplemobiletools.commons.compose.settings.SettingsGroup import com.simplemobiletools.commons.compose.settings.SettingsPreferenceComponent import com.simplemobiletools.commons.compose.settings.SettingsTitleTextComponent -import com.simplemobiletools.commons.compose.settings.scaffold.SettingsScaffold import com.simplemobiletools.commons.compose.theme.AppThemeSurface import com.simplemobiletools.commons.compose.theme.divider_grey import com.simplemobiletools.commons.helpers.isTiramisuPlus @@ -38,7 +38,7 @@ internal fun SettingsScreen( displayLanguage: String, featureLockedDialogState : AlertDialogState ) { - SettingsScaffold(title = stringResource(id = R.string.settings), goBack = goBack) { + SimpleColumnScaffold(title = stringResource(id = R.string.settings), goBack = goBack) { SettingsGroup(title = { SettingsTitleTextComponent(text = stringResource(id = R.string.color_customization)) }) { diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/Config.kt index 6bbb71a0..ceeec4b8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/Config.kt @@ -37,9 +37,7 @@ class Config(context: Context) : BaseConfig(context) { prefs.edit().putString("$CONVERTER_UNITS_PREFIX.${converter.key}", "${topUnit.key},${bottomUnit.key}").apply() } - val preventPhoneFromSleepingFlow: Flow = prefs.run { sharedPreferencesCallback { preventPhoneFromSleeping } }.filterNotNull() - val vibrateOnButtonPressFlow: Flow = prefs.run { sharedPreferencesCallback { vibrateOnButtonPress } }.filterNotNull() - val wasUseEnglishToggledFlow: Flow = prefs.run { sharedPreferencesCallback { wasUseEnglishToggled } }.filterNotNull() - val useEnglishFlow: Flow = prefs.run { sharedPreferencesCallback { useEnglish } }.filterNotNull() - val useCommaAsDecimalMarkFlow: Flow = prefs.run { sharedPreferencesCallback { useCommaAsDecimalMark } }.filterNotNull() + val preventPhoneFromSleepingFlow: Flow = ::preventPhoneFromSleeping.asFlowNonNull() + val vibrateOnButtonPressFlow: Flow = ::vibrateOnButtonPress.asFlowNonNull() + val useCommaAsDecimalMarkFlow: Flow = ::useCommaAsDecimalMark.asFlowNonNull() } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4cea11e9..c0f676bf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,10 +8,10 @@ androidx-customView = "1.2.0-alpha02" androidx-customViewPooling = "1.0.0" androidx-lifecycle = "2.7.0-alpha02" #Compose -composeActivity = "1.8.0-rc01" -compose = "1.6.0-alpha06" +composeActivity = "1.8.0" +compose = "1.6.0-alpha07" composeCompiler = "1.5.3" -composeMaterial3 = "1.2.0-alpha08" +composeMaterial3 = "1.2.0-alpha09" #AutoFitTextView autofittextview = "0.2.1" #exp4j @@ -19,7 +19,7 @@ exp4j = "0.4.8" #Room room = "2.5.2" #Simple tools -simple-commons = "5df1c152c5" +simple-commons = "fd497d3719" #Gradle gradlePlugins-agp = "8.1.2" #build