mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 05:27:28 +01:00
Viewer navigation (#3869)
* Viewer navigation Co-authored-by: Harsh Parekh <h.x.dev@outlook.com> * Match current reader behavior and add ability to invert it * A bit of clean up * Clean up inversion * Only create navigator when changed and change tap zone when invertTapping is changed * Clean up PagerConfig * Change how Viewer navigation works * Add Edge Navigation Co-authored-by: Harsh Parekh <h.x.dev@outlook.com>
This commit is contained in:
@@ -65,6 +65,10 @@ object PreferenceKeys {
|
||||
|
||||
const val readWithVolumeKeysInverted = "reader_volume_keys_inverted"
|
||||
|
||||
const val navigationModePager = "reader_navigation_mode_pager"
|
||||
|
||||
const val navigationModeWebtoon = "reader_navigation_mode_webtoon"
|
||||
|
||||
const val webtoonSidePadding = "webtoon_side_padding"
|
||||
|
||||
const val portraitColumns = "pref_library_columns_portrait_key"
|
||||
|
||||
@@ -31,10 +31,10 @@ object PreferenceValues {
|
||||
LIST,
|
||||
}
|
||||
|
||||
enum class TappingInvertMode {
|
||||
enum class TappingInvertMode(val shouldInvertHorizontal: Boolean = false, val shouldInvertVertical: Boolean = false) {
|
||||
NONE,
|
||||
HORIZONTAL,
|
||||
VERTICAL,
|
||||
BOTH
|
||||
HORIZONTAL(shouldInvertHorizontal = true),
|
||||
VERTICAL(shouldInvertVertical = true),
|
||||
BOTH(shouldInvertHorizontal = true, shouldInvertVertical = true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +138,10 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun readWithVolumeKeysInverted() = flowPrefs.getBoolean(Keys.readWithVolumeKeysInverted, false)
|
||||
|
||||
fun navigationModePager() = flowPrefs.getInt(Keys.navigationModePager, 0)
|
||||
|
||||
fun navigationModeWebtoon() = flowPrefs.getInt(Keys.navigationModeWebtoon, 0)
|
||||
|
||||
fun portraitColumns() = flowPrefs.getInt(Keys.portraitColumns, 0)
|
||||
|
||||
fun landscapeColumns() = flowPrefs.getInt(Keys.landscapeColumns, 0)
|
||||
|
||||
Reference in New Issue
Block a user