Use enum instead of boolean

This commit is contained in:
Andreas E
2020-06-23 12:09:10 +02:00
parent 0ea0eba4f0
commit c8a6a2653f
7 changed files with 41 additions and 8 deletions

View File

@@ -30,4 +30,11 @@ object PreferenceValues {
COMFORTABLE_GRID,
LIST,
}
enum class TappingInvertMode {
NONE,
HORIZONTAL,
VERTICAL,
BOTH
}
}

View File

@@ -121,7 +121,7 @@ class PreferencesHelper(val context: Context) {
fun readWithTapping() = flowPrefs.getBoolean(Keys.readWithTapping, true)
fun readWithTappingInverted() = flowPrefs.getBoolean(Keys.readWithTappingInverted, false)
fun readWithTappingInverted() = flowPrefs.getEnum(Keys.readWithTappingInverted, Values.TappingInvertMode.NONE)
fun readWithLongTap() = flowPrefs.getBoolean(Keys.readWithLongTap, true)