Keep the header while the board scrolls

a155b6a · Gabriel Morell · 2026-09-02 22:03

11 files +20 -14
Message
{commit_body(@commit)}

Files changed

modified clients/android/app/src/main/java/io/neiam/apolloscrib/ui/BoardScreen.kt
+20 −14
@@ -62,19 +62,23 @@ fun BoardScreen(
62 62 val lastUpdated = remember(boards) { store.lastUpdated() }
63 63 val stale = remember(boards) { store.isStale() }
64 64
65 − LazyColumn(
66 − modifier = modifier.fillMaxSize().padding(16.dp),
67 − verticalArrangement = Arrangement.spacedBy(12.dp)
68 − ) {
69 − item {
70 − StatusHeader(
71 − state = state,
72 − lastUpdated = lastUpdated,
73 − stale = stale,
74 − onEditConnection = onEditConnection
75 − )
76 − }
65 + Column(modifier = modifier.fillMaxSize()) {
66 + // Outside the list rather than its first row: what the connection is
67 + // doing should not scroll away, since it is the thing that tells you
68 + // whether the board under it is worth reading.
69 + StatusHeader(
70 + state = state,
71 + lastUpdated = lastUpdated,
72 + stale = stale,
73 + onEditConnection = onEditConnection,
74 + modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 16.dp, bottom = 8.dp)
75 + )
77 76
77 + LazyColumn(
78 + modifier = Modifier.fillMaxSize(),
79 + contentPadding = PaddingValues(start = 16.dp, end = 16.dp, bottom = 16.dp),
80 + verticalArrangement = Arrangement.spacedBy(12.dp)
81 + ) {
78 82 if (entries.isEmpty()) {
79 83 item {
80 84 Card(Modifier.fillMaxWidth()) {
@@ -135,6 +139,7 @@ fun BoardScreen(
135 139 )
136 140 }
137 141 }
142 + }
138 143 }
139 144 }
140 145
@@ -143,11 +148,12 @@ private fun StatusHeader(
143 148 state: AnkyraClient.State,
144 149 lastUpdated: Long?,
145 150 stale: Boolean,
146 − onEditConnection: (() -> Unit)?
151 + onEditConnection: (() -> Unit)?,
152 + modifier: Modifier = Modifier
147 153 ) {
148 154 val palette = LocalAppTheme.current
149 155 Row(
150 − modifier = Modifier.fillMaxWidth(),
156 + modifier = modifier.fillMaxWidth(),
151 157 verticalAlignment = Alignment.Top
152 158 ) {
153 159 // The name, and when the board it is showing arrived. What the screen

Parents: 98e5282