Skip to content
Snippets Groups Projects
Commit f5a8984e authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix TV key events forwarded to the wrong fragment

parent 04f310e9
Branches master
No related tags found
1 merge request!803Tv fixes and improvements
......@@ -101,8 +101,11 @@ class VerticalGridActivity : BaseTvActivity(), BrowserActivityInterface {
(fragment as DetailsFragment).showDetails()
return true
}
if ((fragment as? OnKeyPressedListener)?.onKeyPressed(keyCode) == true) {
try {
if ((supportFragmentManager.fragments[0] as? OnKeyPressedListener)?.onKeyPressed(keyCode) == true) {
return true
}
} catch (e: IndexOutOfBoundsException) {
}
}
return super.onKeyDown(keyCode, event)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment