mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Create new draft in selected collection
This commit is contained in:
parent
3ccc9d68fd
commit
8184919697
@ -22,10 +22,6 @@ struct ContentView: View {
|
||||
withAnimation {
|
||||
// Un-set the currently selected post
|
||||
self.model.selectedPost = nil
|
||||
|
||||
// Navigate to the Drafts list
|
||||
self.model.showAllPosts = false
|
||||
self.model.selectedCollection = nil
|
||||
}
|
||||
// Create the new-post managed object
|
||||
let managedPost = model.editor.generateNewLocalPost(withFont: model.preferences.font)
|
||||
|
@ -32,7 +32,7 @@ struct PostEditorModel {
|
||||
managedPost.title = ""
|
||||
managedPost.body = ""
|
||||
managedPost.status = PostStatus.local.rawValue
|
||||
managedPost.collectionAlias = nil
|
||||
managedPost.collectionAlias = WriteFreelyModel.shared.selectedCollection?.alias
|
||||
switch appearance {
|
||||
case 1:
|
||||
managedPost.appearance = "sans"
|
||||
|
@ -132,10 +132,6 @@ struct WriteFreely_MultiPlatformApp: App {
|
||||
withAnimation {
|
||||
// Un-set the currently selected post
|
||||
self.model.selectedPost = nil
|
||||
|
||||
// Navigate to the Drafts list
|
||||
self.model.showAllPosts = false
|
||||
self.model.selectedCollection = nil
|
||||
}
|
||||
// Create the new-post managed object
|
||||
let managedPost = model.editor.generateNewLocalPost(withFont: model.preferences.font)
|
||||
|
Loading…
Reference in New Issue
Block a user