Migrate views: move all SectionTextFooter / SectionSpacer out of SectionView lambdas

Same pre-card-chrome pattern as elsewhere. MigrateToDevice (4 footers)
and MigrateFromDevice (9 footers + 1 SectionSpacer in error view)
historically wrote captions and inter-card spacers inside their
SectionView content lambdas. After PR #6777 added card chrome these
rendered inside the white cards.

MigrateToDevice fixes (4 footers, one per sub-view):
- Confirm network settings footer
- Database init failed retry footer
- Archive import failed retry footer
- Passphrase entering dynamic footer

MigrateFromDevice fixes (9 footers + 1 SectionSpacer):
- ChatStopFailed view footer
- Passphrase confirmation footer
- Upload confirmation footer
- Upload failed retry footer
- Link shown view: archive-will-be-deleted + choose-migrate footers
- Finished view: 2 warning footers (must-not-use-two-devices,
  using-on-two-devices-breaks-encryption)
- Implicit SectionSpacer at ChatStopFailed view also moved out

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
another-simple-pixel
2026-05-16 12:32:15 -07:00
parent e2e3958d67
commit 64d8fca9cd
2 changed files with 12 additions and 12 deletions
@@ -201,8 +201,8 @@ private fun MutableState<MigrationFromState>.ChatStopFailedView(reason: String)
textColor = MaterialTheme.colors.error,
click = ::stopChat
){}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_chat_should_be_stopped))
}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_chat_should_be_stopped))
}
@Composable
@@ -243,8 +243,8 @@ private fun MutableState<MigrationFromState>.PassphraseConfirmationView() {
}
}
) {}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_confirm_you_remember_passphrase))
}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_confirm_you_remember_passphrase))
}
if (verifyingPassphrase.value) {
ProgressView()
@@ -261,8 +261,8 @@ private fun MutableState<MigrationFromState>.UploadConfirmationView() {
textColor = MaterialTheme.colors.primary,
click = { state = MigrationFromState.Archiving }
){}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_all_data_will_be_uploaded))
}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_all_data_will_be_uploaded))
}
@Composable
@@ -319,8 +319,8 @@ private fun MutableState<MigrationFromState>.UploadFailedView(totalBytes: Long,
state = MigrationFromState.DatabaseInit(totalBytes, archivePath)
}
) {}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_try_again))
}
SectionTextFooter(stringResource(MR.strings.migrate_from_device_try_again))
LaunchedEffect(Unit) {
chatReceiver?.stopAndCleanUp()
}
@@ -361,9 +361,9 @@ private fun MutableState<MigrationFromState>.LinkShownView(fileId: Long, link: S
)
}
) {}
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_archive_will_be_deleted))
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_choose_migrate_from_another_device))
}
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_archive_will_be_deleted))
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_choose_migrate_from_another_device))
SectionSpacer()
SectionView(stringResource(MR.strings.show_QR_code).uppercase()) {
SimpleXLinkQRCode(link, onShare = {})
@@ -410,9 +410,9 @@ private fun MutableState<MigrationFromState>.FinishedView(chatDeletion: Boolean)
)
}
) {}
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_you_must_not_start_database_on_two_device))
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_using_on_two_device_breaks_encryption))
}
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_you_must_not_start_database_on_two_device))
SectionTextFooter(annotatedStringResource(MR.strings.migrate_from_device_using_on_two_device_breaks_encryption))
if (chatDeletion) {
ProgressView()
}
@@ -297,8 +297,8 @@ private fun ModalData.OnionView(link: String, legacyLinkSocksProxy: String?, lin
}
}
){}
SectionTextFooter(stringResource(MR.strings.migrate_to_device_confirm_network_settings_footer))
}
SectionTextFooter(stringResource(MR.strings.migrate_to_device_confirm_network_settings_footer))
SectionSpacer()
@@ -374,8 +374,8 @@ private fun MutableState<MigrationToState?>.DownloadFailedView(link: String, cha
state = MigrationToState.DatabaseInit(link, netCfg, networkProxy)
}
) {}
SectionTextFooter(stringResource(MR.strings.migrate_to_device_try_again))
}
SectionTextFooter(stringResource(MR.strings.migrate_to_device_try_again))
LaunchedEffect(Unit) {
chatReceiver?.stopAndCleanUp()
File(archivePath).delete()
@@ -405,8 +405,8 @@ private fun MutableState<MigrationToState?>.ArchiveImportFailedView(archivePath:
state = MigrationToState.ArchiveImport(archivePath, netCfg, networkProxy)
}
) {}
SectionTextFooter(stringResource(MR.strings.migrate_to_device_try_again))
}
SectionTextFooter(stringResource(MR.strings.migrate_to_device_try_again))
}
@Composable
@@ -500,8 +500,8 @@ private fun MutableState<MigrationToState?>.MigrationConfirmationView(status: DB
}
) {}
}
SectionTextFooter(footer)
}
SectionTextFooter(footer)
}
@Composable