diff --git a/Shared/PostList/PostListView.swift b/Shared/PostList/PostListView.swift
index 2fb4b7a..ffc545b 100644
--- a/Shared/PostList/PostListView.swift
+++ b/Shared/PostList/PostListView.swift
@@ -86,12 +86,6 @@ struct PostListView: View {
)
)
.navigationSubtitle(postCount == 1 ? "\(postCount) post" : "\(postCount) posts")
- .onChange(of: selectedCollection, perform: { _ in
- DispatchQueue.main.async {
- self.model.selectedPost = nil
- self.model.editor.clearLastDraft()
- }
- })
#endif
}
}
diff --git a/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist b/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist
index 2723ebe..6cd8075 100644
--- a/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -7,12 +7,12 @@
WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_
orderHint
- 0
+ 1
WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_
orderHint
- 1
+ 0
diff --git a/macOS/PostEditor/PostEditorView.swift b/macOS/PostEditor/PostEditorView.swift
index 08d0b9a..4b7ab68 100644
--- a/macOS/PostEditor/PostEditorView.swift
+++ b/macOS/PostEditor/PostEditorView.swift
@@ -39,6 +39,9 @@ struct PostEditorView: View {
}
})
.onDisappear(perform: {
+ DispatchQueue.main.async {
+ model.editor.clearLastDraft()
+ }
if post.title.count == 0
&& post.body.count == 0
&& post.status == PostStatus.local.rawValue