mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Dispatch last-draft URL save to main queue to avoid iPad race condition
This commit is contained in:
parent
14aed4a14d
commit
c1ed348c96
@ -139,7 +139,9 @@ struct PostEditorView: View {
|
||||
.onAppear(perform: {
|
||||
self.selectedCollection = collections.first { $0.alias == post.collectionAlias }
|
||||
if post.status != PostStatus.published.rawValue {
|
||||
self.model.editor.saveLastDraft(post)
|
||||
DispatchQueue.main.async {
|
||||
self.model.editor.saveLastDraft(post)
|
||||
}
|
||||
} else {
|
||||
self.model.editor.clearLastDraft()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user