diff --git a/apps/ios/Shared/Views/Migration/MigrateFromDevice.swift b/apps/ios/Shared/Views/Migration/MigrateFromDevice.swift index b3b7269d22..aa02ebb12a 100644 --- a/apps/ios/Shared/Views/Migration/MigrateFromDevice.swift +++ b/apps/ios/Shared/Views/Migration/MigrateFromDevice.swift @@ -333,16 +333,16 @@ struct MigrateFromDevice: View { ZStack { List { Section { - Button(action: { alert = .deleteChat() }) { - settingsRow("trash.fill") { - Text("Delete database from this device").foregroundColor(.accentColor) - } - } Button(action: { alert = .startChat() }) { settingsRow("play.fill") { Text("Start chat").foregroundColor(.red) } } + Button(action: { alert = .deleteChat() }) { + settingsRow("trash.fill") { + Text("Delete database from this device").foregroundColor(.accentColor) + } + } } header: { Text("Migration complete") } footer: { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/migration/MigrateFromDevice.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/migration/MigrateFromDevice.kt index 10add37e54..d51bb17e40 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/migration/MigrateFromDevice.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/migration/MigrateFromDevice.kt @@ -375,22 +375,6 @@ private fun MutableState.LinkShownView(fileId: Long, link: S private fun MutableState.FinishedView(chatDeletion: Boolean) { Box { SectionView(stringResource(MR.strings.migrate_from_device_migration_complete).uppercase()) { - SettingsActionItemWithContent( - icon = painterResource(MR.images.ic_delete_forever), - text = stringResource(MR.strings.migrate_from_device_delete_database_from_device), - textColor = MaterialTheme.colors.primary, - click = { - AlertManager.shared.showAlertDialog( - title = generalGetString(MR.strings.delete_chat_profile_question), - text = generalGetString(MR.strings.delete_chat_profile_action_cannot_be_undone_warning), - confirmText = generalGetString(MR.strings.delete_verb), - onConfirm = { - deleteChatAndDismiss() - } - ) - } - ) {} - SettingsActionItemWithContent( icon = painterResource(MR.images.ic_play_arrow_filled), text = stringResource(MR.strings.migrate_from_device_start_chat), @@ -406,6 +390,22 @@ private fun MutableState.FinishedView(chatDeletion: Boolean) ) } ) {} + + SettingsActionItemWithContent( + icon = painterResource(MR.images.ic_delete_forever), + text = stringResource(MR.strings.migrate_from_device_delete_database_from_device), + textColor = MaterialTheme.colors.primary, + click = { + AlertManager.shared.showAlertDialog( + title = generalGetString(MR.strings.delete_chat_profile_question), + text = generalGetString(MR.strings.delete_chat_profile_action_cannot_be_undone_warning), + confirmText = generalGetString(MR.strings.delete_verb), + onConfirm = { + deleteChatAndDismiss() + } + ) + } + ) {} 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)) }