mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 12:08:56 +01:00
Remove some state from the library view
This commit is contained in:
@@ -13,6 +13,8 @@ import java.io.File
|
||||
|
||||
fun <T> Preference<T>.getOrDefault(): T = get() ?: defaultValue()!!
|
||||
|
||||
fun Preference<Boolean>.invert(): Boolean = getOrDefault().let { set(!it); !it }
|
||||
|
||||
class PreferencesHelper(context: Context) {
|
||||
|
||||
val keys = PreferenceKeys(context)
|
||||
|
||||
Reference in New Issue
Block a user