mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Clear last draft when leaving the editor
This commit is contained in:
parent
8f0d21c5e1
commit
14aed4a14d
@ -145,6 +145,7 @@ struct PostEditorView: View {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.onDisappear(perform: {
|
.onDisappear(perform: {
|
||||||
|
self.model.editor.clearLastDraft()
|
||||||
if post.title.count == 0
|
if post.title.count == 0
|
||||||
&& post.body.count == 0
|
&& post.body.count == 0
|
||||||
&& post.status == PostStatus.local.rawValue
|
&& post.status == PostStatus.local.rawValue
|
||||||
|
Loading…
Reference in New Issue
Block a user