mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Fix volume keys intercepted even if the setting was off
This commit is contained in:
parent
62e7bead73
commit
7afd224aff
@ -264,16 +264,16 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
|
|
||||||
when (event.keyCode) {
|
when (event.keyCode) {
|
||||||
KeyEvent.KEYCODE_VOLUME_DOWN -> {
|
KeyEvent.KEYCODE_VOLUME_DOWN -> {
|
||||||
if (activity.menuVisible) {
|
if (!config.volumeKeysEnabled || activity.menuVisible) {
|
||||||
return false
|
return false
|
||||||
} else if (config.volumeKeysEnabled && isUp) {
|
} else if (isUp) {
|
||||||
if (!config.volumeKeysInverted) moveDown() else moveUp()
|
if (!config.volumeKeysInverted) moveDown() else moveUp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyEvent.KEYCODE_VOLUME_UP -> {
|
KeyEvent.KEYCODE_VOLUME_UP -> {
|
||||||
if (activity.menuVisible) {
|
if (!config.volumeKeysEnabled || activity.menuVisible) {
|
||||||
return false
|
return false
|
||||||
} else if (config.volumeKeysEnabled && isUp) {
|
} else if (isUp) {
|
||||||
if (!config.volumeKeysInverted) moveUp() else moveDown()
|
if (!config.volumeKeysInverted) moveUp() else moveDown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,16 +209,16 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
|
|
||||||
when (event.keyCode) {
|
when (event.keyCode) {
|
||||||
KeyEvent.KEYCODE_VOLUME_DOWN -> {
|
KeyEvent.KEYCODE_VOLUME_DOWN -> {
|
||||||
if (activity.menuVisible) {
|
if (!config.volumeKeysEnabled || activity.menuVisible) {
|
||||||
return false
|
return false
|
||||||
} else if (config.volumeKeysEnabled && isUp) {
|
} else if (isUp) {
|
||||||
if (!config.volumeKeysInverted) scrollDown() else scrollUp()
|
if (!config.volumeKeysInverted) scrollDown() else scrollUp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyEvent.KEYCODE_VOLUME_UP -> {
|
KeyEvent.KEYCODE_VOLUME_UP -> {
|
||||||
if (activity.menuVisible) {
|
if (!config.volumeKeysEnabled || activity.menuVisible) {
|
||||||
return false
|
return false
|
||||||
} else if (config.volumeKeysEnabled && isUp) {
|
} else if (isUp) {
|
||||||
if (!config.volumeKeysInverted) scrollUp() else scrollDown()
|
if (!config.volumeKeysInverted) scrollUp() else scrollDown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user