mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 20:45:49 +00:00
ios: fix crash on migration to device (#5716)
* ios: fix crash on migration to device * fix * remove logs * changes * logs * changes --------- Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
This commit is contained in:
@@ -539,7 +539,7 @@ struct MigrateToDevice: View {
|
||||
chatInitControllerRemovingDatabases()
|
||||
} else if ChatModel.shared.chatRunning == true {
|
||||
// cannot delete storage if chat is running
|
||||
try await apiStopChat()
|
||||
try await stopChatAsync()
|
||||
}
|
||||
try await apiDeleteStorage()
|
||||
try? FileManager.default.createDirectory(at: getWallpaperDirectory(), withIntermediateDirectories: true)
|
||||
@@ -632,6 +632,8 @@ struct MigrateToDevice: View {
|
||||
private func hideView() {
|
||||
onboardingStageDefault.set(.onboardingComplete)
|
||||
m.onboardingStage = .onboardingComplete
|
||||
m.migrationState = nil
|
||||
MigrationToDeviceState.save(nil)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user