From f4ba5f9a901e37b7f47d620f88fc43ca49a90abe Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Thu, 29 Dec 2022 09:06:31 -0500 Subject: [PATCH] Don't navigate to new/last draft on launch (#238) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. * Bump build number and update change log --- CHANGELOG.md | 1 + Shared/WriteFreely_MultiPlatformApp.swift | 2 ++ WriteFreely-MultiPlatform.xcodeproj/project.pbxproj | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e782eb4..926de5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Mac] Updated the URL and minimum version of the WriteFreely Swift package. - [Mac] Upgraded the Sparkle package to v2. - [Mac] The app now prompts you to reach out to our user forums if it detects a crash. +- [iOS] Temporarily removed the new-draft-on-launch feature while investigating a crashing bug. ### Fixed 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() { diff --git a/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj b/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj index de527cf..3057927 100644 --- a/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj +++ b/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj @@ -1050,7 +1050,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CODE_SIGN_ENTITLEMENTS = "ActionExtension-iOS/ActionExtension-iOS.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 693; + CURRENT_PROJECT_VERSION = 694; DEVELOPMENT_TEAM = TPPAB4YBA6; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "ActionExtension-iOS/Info.plist"; @@ -1081,7 +1081,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CODE_SIGN_ENTITLEMENTS = "ActionExtension-iOS/ActionExtension-iOS.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 693; + CURRENT_PROJECT_VERSION = 694; DEVELOPMENT_TEAM = TPPAB4YBA6; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "ActionExtension-iOS/Info.plist"; @@ -1224,7 +1224,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = "WriteFreely-MultiPlatform (iOS).entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 693; + CURRENT_PROJECT_VERSION = 694; DEVELOPMENT_TEAM = TPPAB4YBA6; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = iOS/Info.plist; @@ -1250,7 +1250,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = "WriteFreely-MultiPlatform (iOS).entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 693; + CURRENT_PROJECT_VERSION = 694; DEVELOPMENT_TEAM = TPPAB4YBA6; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = iOS/Info.plist;