-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prep Mac app for release, fix bugs in iOS app #258
Conversation
For launch, I propose we support the current version of macOS (14.x) and one version earlier (13.x).
if let languageCode = Locale.current.languageCode { | ||
post.language = languageCode | ||
post.rtl = Locale.characterDirection(forLanguage: languageCode) == .rightToLeft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was throwing warnings in newer versions of Xcode.
NSApp.keyWindow?.contentViewController?.tryToPerform( | ||
#selector(NSSplitViewController.toggleSidebar(_:)), with: nil | ||
#if os(macOS) | ||
WFNavigation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're essentially just wrapping these same views in our new WFNavigation view.
|
||
var body: some View { | ||
#if os(macOS) | ||
NavigationSplitView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we want to move the iOS app to use NavigationSplitView for iOS 16+
@@ -126,18 +126,18 @@ struct PostListView: View { | |||
.frame(height: frameHeight) | |||
.background(Color(UIColor.systemGray5)) | |||
.overlay(Divider(), alignment: .top) | |||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time the app becomes active, this notification would fire in iOS 17 and navigate us back to the Post list view. Moving it to an onAppear
modifier below fixes this behaviour will maintaining the list-refresh intent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to go!
This PR closes #248 and #256, and makes progress towards #224.
To prepare for the release of the Mac app, we get some dependencies upgraded for Sparkle (as well as docs for updating the app), and set up a new WFNavigation view that begins to incorporate SwiftUI's newer navigation paradigms into the Mac app. Some work has been done around the iOS app but it's a bit trickier to manage.
This PR also fixes a bug that would force the app to navigate back to the post list whenever you'd switch over to another app.