From 14aed4a14dec141fdb2a0e3269a6a6f1fa43d3c0 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Wed, 4 Nov 2020 14:05:44 -0500 Subject: [PATCH] Clear last draft when leaving the editor --- iOS/PostEditor/PostEditorView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/iOS/PostEditor/PostEditorView.swift b/iOS/PostEditor/PostEditorView.swift index a5699f4..39c9839 100644 --- a/iOS/PostEditor/PostEditorView.swift +++ b/iOS/PostEditor/PostEditorView.swift @@ -145,6 +145,7 @@ struct PostEditorView: View { } }) .onDisappear(perform: { + self.model.editor.clearLastDraft() if post.title.count == 0 && post.body.count == 0 && post.status == PostStatus.local.rawValue