Add ability to tweak auto hide sensitivity in Webtoon Reader (#5650)

* Tweak threshold

* Put setting under Webtoon instead

Because it only affects Webtoon related viewers
This commit is contained in:
Andreas
2021-08-07 16:34:47 +02:00
committed by GitHub
parent 2f94f62a56
commit 7907a4fc24
6 changed files with 42 additions and 1 deletions

View File

@@ -87,6 +87,8 @@ object PreferenceKeys {
const val showNavigationOverlayOnStart = "reader_navigation_overlay_on_start"
const val readerHideThreshold = "reader_hide_threshold"
const val webtoonSidePadding = "webtoon_side_padding"
const val portraitColumns = "pref_library_columns_portrait_key"

View File

@@ -43,4 +43,11 @@ object PreferenceValues {
VERTICAL(shouldInvertVertical = true),
BOTH(shouldInvertHorizontal = true, shouldInvertVertical = true),
}
enum class ReaderHideThreshold(val threshold: Int) {
HIGHEST(5),
HIGH(13),
LOW(31),
LOWEST(47)
}
}

View File

@@ -167,6 +167,8 @@ class PreferencesHelper(val context: Context) {
fun showNavigationOverlayOnStart() = flowPrefs.getBoolean(Keys.showNavigationOverlayOnStart, false)
fun readerHideTreshold() = flowPrefs.getEnum(Keys.readerHideThreshold, Values.ReaderHideThreshold.LOW)
fun portraitColumns() = flowPrefs.getInt(Keys.portraitColumns, 0)
fun landscapeColumns() = flowPrefs.getInt(Keys.landscapeColumns, 0)