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: {
|
.onAppear(perform: {
|
||||||
self.selectedCollection = collections.first { $0.alias == post.collectionAlias }
|
self.selectedCollection = collections.first { $0.alias == post.collectionAlias }
|
||||||
if post.status != PostStatus.published.rawValue {
|
if post.status != PostStatus.published.rawValue {
|
||||||
self.model.editor.saveLastDraft(post)
|
DispatchQueue.main.async {
|
||||||
|
self.model.editor.saveLastDraft(post)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
self.model.editor.clearLastDraft()
|
self.model.editor.clearLastDraft()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user