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:
Angelo Stavrow 2022-12-18 08:16:16 -05:00
parent 1361ff7586
commit b81276d629
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -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() {