mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add Technotes/Bugs folder and MacStateRestoration.md file. Starting to move things like this out of my personal notes and into the repo.
This commit is contained in:
59
Technotes/Bugs/MacStateRestoration.md
Normal file
59
Technotes/Bugs/MacStateRestoration.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Mac State Restoration
|
||||
|
||||
https://github.com/Ranchero-Software/NetNewsWire/issues/4589
|
||||
|
||||
https://github.com/Ranchero-Software/NetNewsWire/issues/4631
|
||||
|
||||
## State to restore
|
||||
|
||||
Hide Read Articles
|
||||
Hide Read Feeds
|
||||
Windows positions, including split view positions
|
||||
|
||||
## Warnings
|
||||
|
||||
WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
|
||||
|
||||
## How state restoration works according to Apple
|
||||
|
||||
Info.plist: NSApplicationSupportsRestorableState - true
|
||||
|
||||
NSUserInterfaceItemIdentification
|
||||
|
||||
NSWindowRestoration Protocol
|
||||
window.restorationClass = …
|
||||
|
||||
encodeRestorableStateWithCoder:
|
||||
restoreStateWithCoder:
|
||||
|
||||
self.restorationIdentifier = "MainWindowController"
|
||||
|
||||
AppDelegate — application:shouldRestoreApplicationState: and application:shouldSaveApplicationState: for complex cases
|
||||
|
||||
Can be turned on and off via system pref
|
||||
|
||||
## Tests
|
||||
|
||||
Window 1
|
||||
Restore position — yes
|
||||
Restore split view position — sometimes
|
||||
Restore timeline position — no
|
||||
Restore Hide Read Feeds — yes
|
||||
Restore Hide Read Articles for inessential — yes
|
||||
|
||||
Window 2
|
||||
Restore position
|
||||
Restore split view position
|
||||
Restore Hide Read Feeds
|
||||
Restore Hide Read Articles for The Verge
|
||||
|
||||
Restores second window but not first
|
||||
|
||||
With state restoration enabled, all three windows appear, but with not everything restored
|
||||
|
||||
---
|
||||
|
||||
Close windows tests
|
||||
|
||||
1 window
|
||||
detail scroll not restored
|
||||
Reference in New Issue
Block a user