diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt index ab2714dc32..c46035c53d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.util.lang.invert abstract class ViewerNavigation { enum class NavigationRegion { - NEXT, PREV, MENU + NEXT, PREV, MENU, RIGHT, LEFT } data class Region( diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt index f5e42e3810..6d3390818a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt @@ -6,11 +6,11 @@ import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation /** * Visualization of default state without any inversion * +---+---+---+ - * | N | N | N | P: Previous + * | P | P | P | P: Previous * +---+---+---+ - * | N | M | P | M: Menu + * | P | M | N | M: Menu * +---+---+---+ - * | P | P | P | N: Next + * | N | N | N | N: Next * +---+---+---+ */ open class LNavigation : ViewerNavigation() { @@ -18,19 +18,19 @@ open class LNavigation : ViewerNavigation() { override var regions: List = listOf( Region( rectF = RectF(0f, 0.33f, 0.33f, 0.66f), - type = NavigationRegion.NEXT + type = NavigationRegion.PREV ), Region( rectF = RectF(0f, 0f, 1f, 0.33f), - type = NavigationRegion.NEXT + type = NavigationRegion.PREV ), Region( rectF = RectF(0.66f, 0.33f, 1f, 0.66f), - type = NavigationRegion.PREV + type = NavigationRegion.NEXT ), Region( rectF = RectF(0f, 0.66f, 1f, 1f), - type = NavigationRegion.PREV + type = NavigationRegion.NEXT ) ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerDefaultNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerDefaultNavigation.kt index 95bbd40d0b..4d25ce815d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerDefaultNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerDefaultNavigation.kt @@ -7,11 +7,11 @@ import eu.kanade.tachiyomi.ui.reader.viewer.navigation.LNavigation /** * Visualization of default state without any inversion * +---+---+---+ - * | N | M | P | P: Previous + * | N | M | P | P: Move Right * +---+---+---+ * | N | M | P | M: Menu * +---+---+---+ - * | N | M | P | N: Next + * | N | M | P | N: Move Left * +---+---+---+ */ class PagerDefaultNavigation : ViewerNavigation() { @@ -19,11 +19,11 @@ class PagerDefaultNavigation : ViewerNavigation() { override var regions: List = listOf( Region( rectF = RectF(0f, 0f, 0.33f, 1f), - type = NavigationRegion.NEXT + type = NavigationRegion.LEFT ), Region( rectF = RectF(0.66f, 0f, 1f, 1f), - type = NavigationRegion.PREV + type = NavigationRegion.RIGHT ), ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt index d6499a350d..e8d64446fc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.ui.reader.model.ChapterTransition import eu.kanade.tachiyomi.ui.reader.model.ReaderPage import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer -import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation +import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation.NavigationRegion import kotlinx.coroutines.MainScope import kotlinx.coroutines.cancel import timber.log.Timber @@ -97,9 +97,11 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { val pos = PointF(event.rawX / pager.width, event.rawY / pager.height) val navigator = config.navigator when (navigator.getAction(pos)) { - ViewerNavigation.NavigationRegion.MENU -> activity.toggleMenu() - ViewerNavigation.NavigationRegion.NEXT -> moveToNext() - ViewerNavigation.NavigationRegion.PREV -> moveToPrevious() + NavigationRegion.MENU -> activity.toggleMenu() + NavigationRegion.NEXT -> moveToNext() + NavigationRegion.PREV -> moveToPrevious() + NavigationRegion.RIGHT -> moveRight() + NavigationRegion.LEFT -> moveLeft() } } pager.longTapListener = f@{ diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt index 30c47e2f4d..a132199d5d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.ui.reader.model.ChapterTransition import eu.kanade.tachiyomi.ui.reader.model.ReaderPage import eu.kanade.tachiyomi.ui.reader.model.ViewerChapters import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer -import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation +import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation.NavigationRegion import kotlinx.coroutines.MainScope import kotlinx.coroutines.cancel import rx.subscriptions.CompositeSubscription @@ -111,9 +111,9 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr else { val navigator = config.navigator when (navigator.getAction(pos)) { - ViewerNavigation.NavigationRegion.MENU -> activity.toggleMenu() - ViewerNavigation.NavigationRegion.NEXT -> scrollDown() - ViewerNavigation.NavigationRegion.PREV -> scrollUp() + NavigationRegion.MENU -> activity.toggleMenu() + NavigationRegion.NEXT, NavigationRegion.RIGHT -> scrollDown() + NavigationRegion.PREV, NavigationRegion.LEFT -> scrollUp() } } }