Keep the number box from eating volume keys or changing subtitles on close
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -177,7 +177,8 @@ internal fun EmbyPlaybackDialog(session: EmbySampleSession, plan: EmbyPlaybackPl
|
||||
return@setOnKeyListener true
|
||||
}
|
||||
numberEntry?.let { entry ->
|
||||
val advance = isOk && event.action == KeyEvent.ACTION_UP || code == KeyEvent.KEYCODE_DPAD_RIGHT && event.action == KeyEvent.ACTION_DOWN
|
||||
// On release, so the key that closes the box can't also act on the channel behind it.
|
||||
val advance = (isOk || code == KeyEvent.KEYCODE_DPAD_RIGHT) && event.action == KeyEvent.ACTION_UP
|
||||
if (advance) { if (entry.onLastSlot) submitNumber(entry) else numberEntry = entry.next() }
|
||||
else if (event.action == KeyEvent.ACTION_DOWN) {
|
||||
numberProblem = null
|
||||
@@ -188,7 +189,7 @@ internal fun EmbyPlaybackDialog(session: EmbySampleSession, plan: EmbyPlaybackPl
|
||||
typedDigit != null -> if (entry.onLastSlot) entry.type(typedDigit).let { numberEntry = it; submitNumber(it) } else numberEntry = entry.type(typedDigit)
|
||||
}
|
||||
}
|
||||
return@setOnKeyListener code != KeyEvent.KEYCODE_BACK
|
||||
return@setOnKeyListener isOk || typedDigit != null || code in listOf(KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT)
|
||||
}
|
||||
val supported = code in listOf(KeyEvent.KEYCODE_DPAD_CENTER, KeyEvent.KEYCODE_ENTER,
|
||||
KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN,
|
||||
|
||||
Reference in New Issue
Block a user