mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Prepare release v1.0.11 for iOS (#225)
* Add error handling to Mac app * Log fatal crashes and present alert on next launch * Update crash alert copy and navigate to help forum * Refactor logging into reuseable methods * Refactor class to use protocol * Add environment object to settings window * Improve deactivation of app when miniaturizing * Chagne dispatch type when creating new post * Bump version and build number * Remove unnecessary TODO comment * Update change log * Log fatal crashes and present alert on next launch * Update crash alert copy and navigate to help forum * Refactor logging into reuseable methods * Add environment object to settings window * Improve deactivation of app when miniaturizing * Chagne dispatch type when creating new post * Improve default window size (#220) * Clean up unnecessary import * Set idealWidth property on sidebars * Unset selected post on collection change (#218) * Unset selected post when changing collection * Update change log * Bump build number and update change log
This commit is contained in:
parent
0d43cb0bd8
commit
884da073e9
17
CHANGELOG.md
17
CHANGELOG.md
@ -37,8 +37,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- [Mac] Fixed a potential crash if the system keychain wasn't available at app launch.
|
||||
- [Mac] Cleaned up some straggling project warnings.
|
||||
- [Mac] Improved error-handling under the hood for better app stability.
|
||||
- [iOS/Mac] Fixed a bug where the new-post button doesn't appear in the iOS 16 beta.
|
||||
- [iOS/Mac] Fixed a bug where alerts weren't presented for login errors.
|
||||
- [Mac] Selecting another collection while a blank draft is in the editor now works as expected.
|
||||
- [Mac] Fixed a bug where the new-post button doesn't appear in the iOS 16 beta.
|
||||
- [Mac] Fixed a bug where the list of posts published outside of a blog didn't update its title (Drafts/Anonymous).
|
||||
- [Mac] Fixed a bug where alerts weren't presented for login errors.
|
||||
- [Mac] Fixed some build warnings in the project.
|
||||
|
||||
## [1.0.11-ios] - 2022-09-07
|
||||
|
||||
- [iOS] Fixed a bug where the new-post button doesn't appear in the iOS 16 beta.
|
||||
- [iOS] Fixed a bug where the list of posts published outside of a blog didn't update its title (Drafts/Anonymous).
|
||||
- [iOS] Fixed a bug where alerts weren't presented for login errors.
|
||||
- [iOS] Fixed some build warnings in the project.
|
||||
|
||||
## [1.0.10-ios] - 2022-07-28
|
||||
|
||||
@ -277,7 +287,8 @@ suffixes to differentiate between platforms, until both are at feature parity.
|
||||
- Contributing guide
|
||||
- This changelog
|
||||
|
||||
[Unreleased]: https://github.com/writeas/writefreely-swiftui-multiplatform/compare/v1.0.10-ios...HEAD
|
||||
[Unreleased]: https://github.com/writeas/writefreely-swiftui-multiplatform/compare/v1.0.11-ios...HEAD
|
||||
[1.0.11-ios]: https://github.com/writeas/writefreely-swiftui-multiplatform/compare/v1.0.10-ios...v1.0.11-ios
|
||||
[1.0.10-ios]: https://github.com/writeas/writefreely-swiftui-multiplatform/compare/v1.0.9-ios...v1.0.10-ios
|
||||
[1.0.9-ios]: https://github.com/writeas/writefreely-swiftui-multiplatform/compare/v1.0.8-ios...v1.0.9-ios
|
||||
[1.0.8-ios]: https://github.com/writeas/writefreely-swiftui-multiplatform/compare/v1.0.7-ios...v1.0.8-ios
|
||||
|
@ -28,7 +28,7 @@ struct ContentView: View {
|
||||
// Create the new-post managed object
|
||||
let managedPost = model.editor.generateNewLocalPost(withFont: model.preferences.font)
|
||||
withAnimation {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now()) {
|
||||
DispatchQueue.main.async {
|
||||
// Load the new post in the editor
|
||||
self.model.selectedPost = managedPost
|
||||
}
|
||||
@ -36,6 +36,7 @@ struct ContentView: View {
|
||||
}, label: { Image(systemName: "square.and.pencil") })
|
||||
.help("Create a new local draft.")
|
||||
}
|
||||
.frame(idealWidth: 200)
|
||||
#else
|
||||
CollectionListView()
|
||||
.withErrorHandling()
|
||||
@ -45,6 +46,7 @@ struct ContentView: View {
|
||||
ZStack {
|
||||
PostListView(selectedCollection: model.selectedCollection, showAllPosts: model.showAllPosts)
|
||||
.withErrorHandling()
|
||||
.frame(idealWidth: 300)
|
||||
if model.isProcessingRequest {
|
||||
ZStack {
|
||||
Color(NSColor.controlBackgroundColor).opacity(0.75)
|
||||
|
@ -33,11 +33,13 @@ struct CollectionListView: View {
|
||||
)
|
||||
.listStyle(SidebarListStyle())
|
||||
.onChange(of: model.selectedCollection) { collection in
|
||||
model.selectedPost = nil
|
||||
if collection != model.editor.fetchSelectedCollectionFromAppStorage() {
|
||||
self.model.editor.selectedCollectionURL = collection?.objectID.uriRepresentation()
|
||||
}
|
||||
}
|
||||
.onChange(of: model.showAllPosts) { value in
|
||||
model.selectedPost = nil
|
||||
if value != model.editor.showAllPostsFlag {
|
||||
self.model.editor.showAllPostsFlag = model.showAllPosts
|
||||
}
|
||||
|
@ -135,6 +135,7 @@ struct WriteFreely_MultiPlatformApp: App {
|
||||
}
|
||||
.tag(2)
|
||||
}
|
||||
.environmentObject(model)
|
||||
.withErrorHandling()
|
||||
.frame(minWidth: 500, maxWidth: 500, minHeight: 200)
|
||||
.padding()
|
||||
|
@ -1054,7 +1054,7 @@
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CODE_SIGN_ENTITLEMENTS = "ActionExtension-iOS/ActionExtension-iOS.entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 674;
|
||||
CURRENT_PROJECT_VERSION = 676;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "ActionExtension-iOS/Info.plist";
|
||||
@ -1085,7 +1085,7 @@
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CODE_SIGN_ENTITLEMENTS = "ActionExtension-iOS/ActionExtension-iOS.entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 674;
|
||||
CURRENT_PROJECT_VERSION = 676;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "ActionExtension-iOS/Info.plist";
|
||||
@ -1228,7 +1228,7 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = "WriteFreely-MultiPlatform (iOS).entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 674;
|
||||
CURRENT_PROJECT_VERSION = 676;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = iOS/Info.plist;
|
||||
@ -1254,7 +1254,7 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = "WriteFreely-MultiPlatform (iOS).entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 674;
|
||||
CURRENT_PROJECT_VERSION = 676;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = iOS/Info.plist;
|
||||
@ -1282,7 +1282,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 620;
|
||||
CURRENT_PROJECT_VERSION = 676;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@ -1292,7 +1292,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = 0.6.0;
|
||||
MARKETING_VERSION = 0.7.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.abunchtell.WriteFreely-MultiPlatform";
|
||||
PRODUCT_NAME = "WriteFreely for Mac";
|
||||
SDKROOT = macosx;
|
||||
@ -1309,7 +1309,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 620;
|
||||
CURRENT_PROJECT_VERSION = 676;
|
||||
DEVELOPMENT_TEAM = TPPAB4YBA6;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@ -1319,7 +1319,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = 0.6.0;
|
||||
MARKETING_VERSION = 0.7.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.abunchtell.WriteFreely-MultiPlatform";
|
||||
PRODUCT_NAME = "WriteFreely for Mac";
|
||||
SDKROOT = macosx;
|
||||
|
@ -1,5 +1,4 @@
|
||||
import Cocoa
|
||||
import Sparkle
|
||||
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
@ -15,13 +14,12 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
// If we're miniaturizing the window, deactivate it as well by activating Finder.app (note that
|
||||
// this will bring any Finder windows that are behind other apps to the foreground).
|
||||
// If we're miniaturizing the window, deactivate it as well.
|
||||
// Credit to KHKnobl on GitHub:
|
||||
// https://github.com/writefreely/writefreely-swiftui-multiplatform/issues/135#issuecomment-1101713817
|
||||
func applicationDidChangeOcclusionState(_ notification: Notification) {
|
||||
if let window = NSApp.windows.first, window.isMiniaturized {
|
||||
NSWorkspace.shared.runningApplications.first(where: {
|
||||
$0.activationPolicy == .regular
|
||||
})?.activate(options: .activateAllWindows)
|
||||
NSApp.hide(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user