Save changes to local store when post status changes

This commit is contained in:
Angelo Stavrow 2020-11-04 14:48:59 -05:00
parent d3e89e2a45
commit 4d37cae4bf
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -142,6 +142,9 @@ struct PostEditorView: View {
} else {
self.model.editor.clearLastDraft()
}
DispatchQueue.main.async {
LocalStorageManager().saveContext()
}
})
.onAppear(perform: {
self.selectedCollection = collections.first { $0.alias == post.collectionAlias }