Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,24 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
attachBackPressedCallback("MainActivity") {
showConfirmExitDialog(settingsManager)
}
// Re-point nav rail focus at the provider button on every arrival
// (rail button, back stack pop, first load), so D-pad right always
// reaches the "None" / provider selector button.
if (isLayout(TV or EMULATOR)) {
val fromView = binding?.navRailView
if (fromView != null) {
fromView.nextFocusRightId = R.id.home_change_api
for (focusView in arrayOf(
R.id.navigation_downloads,
R.id.navigation_home,
R.id.navigation_search,
R.id.navigation_library,
R.id.navigation_settings,
)) {
fromView.findViewById<View?>(focusView)?.nextFocusRightId = R.id.home_change_api
}
}
}
} else detachBackPressedCallback("MainActivity")
}

Expand Down