Create new local posts as Drafts

This commit is contained in:
Angelo Stavrow 2020-10-08 15:15:01 -04:00
parent e3e0784f92
commit a3ffb5a470
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
2 changed files with 8 additions and 6 deletions

View File

@ -104,6 +104,7 @@ struct PostListView: View {
managedPost.title = ""
managedPost.body = ""
managedPost.status = PostStatus.local.rawValue
managedPost.collectionAlias = nil
switch model.preferences.font {
case 1:
managedPost.appearance = "sans"
@ -116,11 +117,12 @@ struct PostListView: View {
managedPost.language = languageCode
managedPost.rtl = Locale.characterDirection(forLanguage: languageCode) == .rightToLeft
}
if let selectedCollectionAlias = selectedCollection?.alias {
managedPost.collectionAlias = selectedCollectionAlias
}
DispatchQueue.main.async {
model.selectedPost = managedPost
self.selectedCollection = nil
self.showAllPosts = false
withAnimation {
self.model.selectedPost = managedPost
}
}
}
}

View File

@ -7,12 +7,12 @@
<key>WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
<key>WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>