28d6001fcda8
compose export screen's 'choose an export format' prompt into remaining viewport height, same fix as import screen
- time
- 2026-07-24 03:04 UTC · 3 months ago
- machine
- koh2
- agent
- claude-sonnet-5
- session
- gate1-gate2-verification-pass
- parent
- 689a906288b0
↓ peach-android-28d6001f.tar.gzatlas at this save
files changed1 file
app/src/main/java/com/peachpasswords/ui/vault/ExportScreen.kt+36 −24app/src/main/java/com/peachpasswords/ui/vault/ExportScreen.kt+36 −24
@@ -176,14 +176,22 @@176176 177177 Spacer(Modifier.size(PeachSpacing.lg))178178 179- Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {180- when (route) {181- ExportRoute.CHOOSE -> ChooseView(182- onPeachScript = { route = ExportRoute.PEACHSCRIPT },183- onCsv = { route = ExportRoute.CSV },184- )185- ExportRoute.PEACHSCRIPT -> PeachScriptExportView(vm)186- ExportRoute.CSV -> CsvExportView(vm)179+ if (route == ExportRoute.CHOOSE) {180+ // Never needs to scroll — give it the real remaining height so181+ // the prompt composes into it instead of trailing into dead182+ // space below the two option cards.183+ ChooseView(184+ onPeachScript = { route = ExportRoute.PEACHSCRIPT },185+ onCsv = { route = ExportRoute.CSV },186+ modifier = Modifier.weight(1f).fillMaxWidth(),187+ )188+ } else {189+ Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {190+ when (route) {191+ ExportRoute.PEACHSCRIPT -> PeachScriptExportView(vm)192+ ExportRoute.CSV -> CsvExportView(vm)193+ ExportRoute.CHOOSE -> Unit // handled above, outside the scroll container194+ }187195 }188196 }189197 }@@ -193,22 +201,26 @@193201 // ---- Choose view ----------------------------------------------------------194202 195203 @Composable196-private fun ChooseView(onPeachScript: () -> Unit, onCsv: () -> Unit) {197- OptionCard(198- title = "PeachScript (encrypted)",199- subtitle = "A backup encrypted with a separate password. Restores into Peach.",200- onClick = onPeachScript,201- )202- Spacer(Modifier.size(PeachSpacing.md))203- OptionCard(204- title = "CSV (unencrypted)",205- subtitle = "Plain text for moving into another manager. Not encrypted.",206- onClick = onCsv,207- )208- PeachEmptyOrEndState(209- message = "Choose an export format.",210- detail = "Encrypted PeachScript is safest for Peach-to-Peach backups.",211- )204+private fun ChooseView(onPeachScript: () -> Unit, onCsv: () -> Unit, modifier: Modifier = Modifier) {205+ Column(modifier) {206+ OptionCard(207+ title = "PeachScript (encrypted)",208+ subtitle = "A backup encrypted with a separate password. Restores into Peach.",209+ onClick = onPeachScript,210+ )211+ Spacer(Modifier.size(PeachSpacing.md))212+ OptionCard(213+ title = "CSV (unencrypted)",214+ subtitle = "Plain text for moving into another manager. Not encrypted.",215+ onClick = onCsv,216+ )217+ Box(Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.Center) {218+ PeachEmptyOrEndState(219+ message = "Choose an export format.",220+ detail = "Encrypted PeachScript is safest for Peach-to-Peach backups.",221+ )222+ }223+ }212224 }213225 214226 @Composable