-
-
Notifications
You must be signed in to change notification settings - Fork 45
feat: implemented initial version of hiding feature #744
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
49fa781
feat: implemented initial version of hiding feature
akramj13 c0b3663
fix: avoid reopening visible settings window
akramj13 d162158
fix(menubar): route icon-visibility writes through the settings model…
FuJacob 827cd29
feat: add quit action to settings sidebar
akramj13 5c45db3
fix: preserve visible settings reopen behavior
akramj13 09f7853
fix: harden settings recovery on cold launch
akramj13 86746bb
docs: update comments
akramj13 78e0a82
fix: apply minor copilot recommendation
akramj13 4fcae14
fix: resolve menu bar settings conflicts with main
akramj13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import Foundation | ||
|
|
||
| /// Decides whether a cold launch needs to reveal Settings as a recovery surface. | ||
| /// | ||
| /// This pure policy lives in `Support/` so AppKit launch details stay in `AppDelegate`, while the | ||
| /// product rule remains deterministic and unit-testable. Manual launches recover users who hid the | ||
| /// status item; login-item launches remain background-only; the development override always wins. | ||
| enum MenuBarRecoveryPolicy { | ||
| static func shouldShowSettingsOnColdLaunch( | ||
| isMenuBarIconVisible: Bool, | ||
| wasLaunchedAtLogin: Bool, | ||
| wasSettingsExplicitlyRequested: Bool | ||
| ) -> Bool { | ||
| wasSettingsExplicitlyRequested | ||
| || (!isMenuBarIconVisible && !wasLaunchedAtLogin) | ||
| } | ||
|
|
||
| /// Lets AppKit perform its normal reopen work when the status item is available, or when the app | ||
| /// already has visible windows and the Settings window exists (so AppKit can activate/restore it). | ||
| /// If only a non-Settings window is visible, Cotabby still opens Settings as the recovery surface. | ||
| static func shouldLetAppKitHandleReopen( | ||
| isMenuBarIconVisible: Bool, | ||
| hasVisibleWindows: Bool, | ||
| isSettingsWindowOpen: Bool | ||
| ) -> Bool { | ||
| isMenuBarIconVisible | ||
| || (hasVisibleWindows && isSettingsWindowOpen) | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.