mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Fix yet another focus problem
This commit is contained in:
parent
83a543ad7d
commit
b8e8a1d913
1 changed files with 9 additions and 0 deletions
|
|
@ -106,6 +106,7 @@ fun SeriesOverviewContent(
|
|||
|
||||
val scrollState = rememberScrollState()
|
||||
val scrollConnection = rememberDelayedNestedScroll()
|
||||
var requestFocusAfterSeason by remember { mutableStateOf(false) }
|
||||
Box(
|
||||
modifier =
|
||||
modifier
|
||||
|
|
@ -146,6 +147,7 @@ fun SeriesOverviewContent(
|
|||
onClick = {
|
||||
selectedTabIndex = it
|
||||
onChangeSeason.invoke(it)
|
||||
requestFocusAfterSeason = true
|
||||
},
|
||||
modifier =
|
||||
Modifier
|
||||
|
|
@ -180,6 +182,13 @@ fun SeriesOverviewContent(
|
|||
}
|
||||
|
||||
is EpisodeList.Success -> {
|
||||
if (requestFocusAfterSeason) {
|
||||
// Changing seasons, so move focus once the new episodes are loaded
|
||||
LaunchedEffect(Unit) {
|
||||
firstItemFocusRequester.tryRequestFocus()
|
||||
requestFocusAfterSeason = false
|
||||
}
|
||||
}
|
||||
val state = rememberLazyListState(position.episodeRowIndex)
|
||||
|
||||
LazyRow(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue