Add helpers to BaseConfig
to be able to use useEnglish
in compose
This commit is contained in:
parent
31af0c48e0
commit
eecd4af5cc
1 changed files with 4 additions and 0 deletions
|
@ -218,10 +218,14 @@ open class BaseConfig(val context: Context) {
|
|||
prefs.edit().putBoolean(USE_ENGLISH, useEnglish).commit()
|
||||
}
|
||||
|
||||
val useEnglishFlow = ::useEnglish.asFlowNonNull()
|
||||
|
||||
var wasUseEnglishToggled: Boolean
|
||||
get() = prefs.getBoolean(WAS_USE_ENGLISH_TOGGLED, false)
|
||||
set(wasUseEnglishToggled) = prefs.edit().putBoolean(WAS_USE_ENGLISH_TOGGLED, wasUseEnglishToggled).apply()
|
||||
|
||||
val wasUseEnglishToggledFlow = ::wasUseEnglishToggled.asFlowNonNull()
|
||||
|
||||
var wasSharedThemeEverActivated: Boolean
|
||||
get() = prefs.getBoolean(WAS_SHARED_THEME_EVER_ACTIVATED, false)
|
||||
set(wasSharedThemeEverActivated) = prefs.edit().putBoolean(WAS_SHARED_THEME_EVER_ACTIVATED, wasSharedThemeEverActivated).apply()
|
||||
|
|
Loading…
Reference in a new issue