Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,13 @@ fun SearchScreen(
when (event.key) {
Key.Back, Key.Escape -> when (focusZone) {
FocusZone.RESULTS -> {
if (showFilters) focusZone = FocusZone.FILTERS
else { focusZone = FocusZone.SEARCH_INPUT; searchFocusRequester.requestFocus() }
// Directly return to sidebar/topbar from results for expected back behavior
focusZone = FocusZone.SIDEBAR
true
}
FocusZone.FILTERS -> { focusZone = FocusZone.SEARCH_INPUT; searchFocusRequester.requestFocus(); true }
FocusZone.SEARCH_INPUT -> {
// If we have search results, go back to results instead of sidebar
// This fixes the issue where back from details goes to keyboard instead of results
// If we have active results, go back to results. Otherwise go to sidebar.
if (activeCategories.isNotEmpty() || hasAiResults) {
focusZone = FocusZone.RESULTS
currentRowIndex = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ fun WatchlistScreen(
}
Key.DirectionLeft -> {
if (!isSidebarFocused) {
true
// Let the grid handle left movement within items.
false
} else {
if (sidebarFocusIndex > 0) {
sidebarFocusIndex = (sidebarFocusIndex - 1).coerceIn(0, maxSidebarIndex)
Expand All @@ -177,6 +178,7 @@ fun WatchlistScreen(
}
true
} else {
// Let the grid handle right movement within items.
false
}
}
Expand Down
Loading