mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Only navigate to new/last draft on launch on macOS
This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.
This commit is contained in:
parent
1361ff7586
commit
b81276d629
@ -152,11 +152,13 @@ struct WriteFreely_MultiPlatformApp: App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func showLastDraftOrCreateNewLocalPost() {
|
private func showLastDraftOrCreateNewLocalPost() {
|
||||||
|
#if os(macOS)
|
||||||
if model.editor.lastDraftURL != nil {
|
if model.editor.lastDraftURL != nil {
|
||||||
self.model.selectedPost = model.editor.fetchLastDraftFromAppStorage()
|
self.model.selectedPost = model.editor.fetchLastDraftFromAppStorage()
|
||||||
} else {
|
} else {
|
||||||
createNewLocalPost()
|
createNewLocalPost()
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private func createNewLocalPost() {
|
private func createNewLocalPost() {
|
||||||
|
Loading…
Reference in New Issue
Block a user