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 1454d67d4..699c8b9b9 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 @@ -264,16 +264,16 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { when (event.keyCode) { KeyEvent.KEYCODE_VOLUME_DOWN -> { - if (activity.menuVisible) { + if (!config.volumeKeysEnabled || activity.menuVisible) { return false - } else if (config.volumeKeysEnabled && isUp) { + } else if (isUp) { if (!config.volumeKeysInverted) moveDown() else moveUp() } } KeyEvent.KEYCODE_VOLUME_UP -> { - if (activity.menuVisible) { + if (!config.volumeKeysEnabled || activity.menuVisible) { return false - } else if (config.volumeKeysEnabled && isUp) { + } else if (isUp) { if (!config.volumeKeysInverted) moveUp() else moveDown() } } 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 335dd9bb5..046c2bde9 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 @@ -209,16 +209,16 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer { when (event.keyCode) { KeyEvent.KEYCODE_VOLUME_DOWN -> { - if (activity.menuVisible) { + if (!config.volumeKeysEnabled || activity.menuVisible) { return false - } else if (config.volumeKeysEnabled && isUp) { + } else if (isUp) { if (!config.volumeKeysInverted) scrollDown() else scrollUp() } } KeyEvent.KEYCODE_VOLUME_UP -> { - if (activity.menuVisible) { + if (!config.volumeKeysEnabled || activity.menuVisible) { return false - } else if (config.volumeKeysEnabled && isUp) { + } else if (isUp) { if (!config.volumeKeysInverted) scrollUp() else scrollDown() } }