mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-03-14 09:45:42 +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:
parent
37050a99c9
commit
5bef7349d8
1 changed files with 3 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue