Closed
Conversation
AvdLee
commented
Jul 3, 2024
| guard let managedObjectID = notification.object as? NSManagedObjectID else { return } | ||
| selection = ConsoleSelectedItem.entity(managedObjectID) | ||
| } | ||
| #endif |
Collaborator
Author
There was a problem hiding this comment.
This is the code regarding notification driven selection
AvdLee
commented
Jul 3, 2024
|
|
||
| @State private var selectedObjectID: NSManagedObjectID? // Has to use for Table | ||
| @State private var selection: ConsoleSelectedItem? | ||
| @State private var shareItems: ShareItems? |
Collaborator
Author
There was a problem hiding this comment.
A bunch of these properties were not used. I guess due to refactors over time?
AvdLee
commented
Jul 3, 2024
| Divider() | ||
| ScrollViewReader { proxy in | ||
| List(selection: $selection) { | ||
| List(selection: $router.selection) { |
Collaborator
Author
There was a problem hiding this comment.
By linking directly to the router, we can remove local state and keep the view in sync with the router at all times.
Owner
|
As suggested in #278 (comment), I recommend creating separate packages for it. I would also avoid relying on these top-level componts like the router cause they might change. It should be safe to use the individual private leaf views. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've removed a bunch of unused code inside the macOS
ConsoleListViewand integrated an option to select entities using a new notification.@kean note that I'm still using my fork, so there's other changes in this PR from the previous one. I'll migrate my project later this week!