From 150893686ff64db3e84200f8d253b9e01e77983c Mon Sep 17 00:00:00 2001 From: Pauljd Date: Fri, 6 Nov 2026 12:35:21 +0000 Subject: [PATCH] Here's where everything goes scrolls with the setting up (0.108.53) Co-Authored-By: Claude Opus 5.5 (1M context) --- .../app/src/main/java/tv/orbit/classic/Onboarding.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/tv/orbit/classic/Onboarding.kt b/android/app/src/main/java/tv/orbit/classic/Onboarding.kt index 098ec3f3..93083116 100644 --- a/android/app/src/main/java/tv/orbit/classic/Onboarding.kt +++ b/android/app/src/main/java/tv/orbit/classic/Onboarding.kt @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items +import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.runtime.* import androidx.compose.ui.Alignment @@ -308,7 +309,14 @@ private fun ChannelsStep(onNext: () -> Unit) { } Column(Modifier.weight(1f).fillMaxHeight(), verticalArrangement = Arrangement.spacedBy(5.dp)) { Text("Here's where everything goes", color = Ink, fontFamily = Anton, fontSize = 26.sp) - ChannelSetup.wanted.forEach { number -> + // A list that scrolls with the setting up (Paul, 6 November 2026: the bottom was cut off), keeping the one being matched in view. + val list = androidx.compose.foundation.lazy.rememberLazyListState() + LaunchedEffect(ChannelSetup.current) { + val at = ChannelSetup.wanted.indexOf(ChannelSetup.current) + if (at >= 0) list.animateScrollToItem((at - 2).coerceAtLeast(0)) + } + androidx.compose.foundation.lazy.LazyColumn(Modifier.weight(1f), state = list, verticalArrangement = Arrangement.spacedBy(5.dp)) { + items(ChannelSetup.wanted, key = { it }) { number -> val count = ChannelSetup.found[number] val busy = ChannelSetup.current == number Row(Modifier.fillMaxWidth().height(40.dp).background(if (busy) Navy else Panel, RoundedCornerShape(8.dp)).border(if (busy) 2.dp else 0.dp, if (busy) Yellow else Color.Transparent, RoundedCornerShape(8.dp)) @@ -325,6 +333,7 @@ private fun ChannelsStep(onNext: () -> Unit) { }, color = if (count != null && count < 0) Yellow else Muted, fontSize = 13.sp) } } + } } } }