@@ -130,7 +130,9 @@ class PromptSelectActivity : ComponentActivity() {
130130 finish()
131131 }
132132 },
133- onOverviewInstructionsClick = { startOverviewInstructions() },
133+ onOverviewInstructionsClick = {
134+ startOverviewInstructions()
135+ },
134136 onSectionClick = { sectionName ->
135137 lifecycleScope.launch {
136138 UploadPauseManager .pauseUploadTimeout(UPLOAD_RESUME_ON_IDLE_TIMEOUT )
@@ -215,20 +217,6 @@ fun PromptSelectScreenContent(
215217 }
216218 )
217219
218- val overviewInstructions = promptState?.promptsCollection?.collectionMetadata?.instructions
219- val showOverviewButton = overviewInstructions != null
220-
221- if (showOverviewButton) {
222- SecondaryButton (
223- onClick = onOverviewInstructionsClick,
224- modifier = Modifier .constrainAs(overviewInstructionsButton) {
225- top.linkTo(toggleTutorialButton.bottom, margin = 16 .dp)
226- end.linkTo(toggleTutorialButton.end)
227- },
228- text = stringResource(R .string.overview_button)
229- )
230- }
231-
232220 Text (
233221 text = stringResource(R .string.prompt_select_title),
234222 fontSize = 48 .sp,
@@ -348,5 +336,22 @@ fun PromptSelectScreenContent(
348336 )
349337 ) {}
350338 }
339+
340+ // Place the overview button after the sections list so that it receives
341+ // click events first.
342+ val overviewInstructions = promptState?.promptsCollection?.collectionMetadata?.instructions
343+ val showOverviewButton = overviewInstructions != null
344+
345+ if (showOverviewButton) {
346+ SecondaryButton (
347+ onClick = onOverviewInstructionsClick,
348+ modifier = Modifier .constrainAs(overviewInstructionsButton) {
349+ top.linkTo(toggleTutorialButton.bottom, margin = 16 .dp)
350+ end.linkTo(toggleTutorialButton.end)
351+ },
352+ text = stringResource(R .string.overview_button)
353+ )
354+ }
355+
351356 }
352357}
0 commit comments