From b81276d6293560f7a6d02e5f80197c04949106df Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Sun, 18 Dec 2022 08:16:16 -0500 Subject: [PATCH] Only navigate to new/last draft on launch on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Shared/WriteFreely_MultiPlatformApp.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shared/WriteFreely_MultiPlatformApp.swift b/Shared/WriteFreely_MultiPlatformApp.swift index 5b0123d..15a8d88 100644 --- a/Shared/WriteFreely_MultiPlatformApp.swift +++ b/Shared/WriteFreely_MultiPlatformApp.swift @@ -152,11 +152,13 @@ struct WriteFreely_MultiPlatformApp: App { } private func showLastDraftOrCreateNewLocalPost() { + #if os(macOS) if model.editor.lastDraftURL != nil { self.model.selectedPost = model.editor.fetchLastDraftFromAppStorage() } else { createNewLocalPost() } + #endif } private func createNewLocalPost() {