mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
feat: update colors, dialogs and deps
This commit is contained in:
@ -84,7 +84,7 @@ class SettingsActivity : AppCompatActivity() {
|
||||
private fun getFeatureLockedDialogState() =
|
||||
rememberAlertDialogState().apply {
|
||||
DialogMember {
|
||||
FeatureLockedAlertDialog(alertDialogState = this, callback = {})
|
||||
FeatureLockedAlertDialog(alertDialogState = this, cancelCallback = {})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
}) {
|
||||
|
@ -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<Boolean> = prefs.run { sharedPreferencesCallback { preventPhoneFromSleeping } }.filterNotNull()
|
||||
val vibrateOnButtonPressFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { vibrateOnButtonPress } }.filterNotNull()
|
||||
val wasUseEnglishToggledFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { wasUseEnglishToggled } }.filterNotNull()
|
||||
val useEnglishFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { useEnglish } }.filterNotNull()
|
||||
val useCommaAsDecimalMarkFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { useCommaAsDecimalMark } }.filterNotNull()
|
||||
val preventPhoneFromSleepingFlow: Flow<Boolean> = ::preventPhoneFromSleeping.asFlowNonNull()
|
||||
val vibrateOnButtonPressFlow: Flow<Boolean> = ::vibrateOnButtonPress.asFlowNonNull()
|
||||
val useCommaAsDecimalMarkFlow: Flow<Boolean> = ::useCommaAsDecimalMark.asFlowNonNull()
|
||||
}
|
||||
|
Reference in New Issue
Block a user