Add option to reverse tapping (#3360)

* Add option to reverse tapping

* Fix string for preference key

* Invert tapping for Webtoon and Vertical

* Use enum instead of boolean

* Add option to reader sheet

* Hide from reader sheet if tapping disabled and remove hard coded string

* Hide option if tapping disabled
This commit is contained in:
arkon
2020-06-25 18:12:12 -04:00
committed by GitHub
11 changed files with 157 additions and 8 deletions

View File

@@ -55,6 +55,8 @@ object PreferenceKeys {
const val readWithTapping = "reader_tap"
const val readWithTappingInverted = "reader_tapping_inverted"
const val readWithLongTap = "reader_long_tap"
const val readWithVolumeKeys = "reader_volume_keys"

View File

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

View File

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