Make sure we persist changes to edited AND local posts

This commit is contained in:
Angelo Stavrow 2020-09-09 12:40:31 -04:00
parent 1baede6cdb
commit 562e3c6a8a
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -43,7 +43,7 @@ struct PostEditorView: View {
}
})
.onDisappear(perform: {
if post.status == PostStatus.edited.rawValue {
if post.status < PostStatus.published.rawValue {
DispatchQueue.main.async {
PersistenceManager().saveContext()
}