mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Create new local posts as Drafts
This commit is contained in:
parent
e3e0784f92
commit
a3ffb5a470
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user