-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
[iOS & tvOS] ItemLibraryViewModel - Cleanup #1411
Conversation
@LePips This all looks correct and is working as intended. Please let me know if there is anything that I should be doing differently or if you had any other cleanup intended! The only missing item I'd like to roll into this PR is from I was looking at adding this (see below) but might need a bit more context. Since
One unintended side effect of using the |
…gLibraryView` to have the default filters. This was originally in place. This Commit just ensures that iOS and tvOS have the same implementation.
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.
Apologies as I haven't had time recently to think deeply about code, but I had other ideas about how this would be implemented. Filtering on the itemTypes
should have only been on the ItemFilterCollection
instead of the FilterViewModel
, as the FilterViewModel
largely serves as an observable source of information for the selected and total collection of filters. I understand they were used for the query filter call, but there was no mechanism to reload these if the filtered item types changes and I'm not worried about filtering those based on the selected item types.
This work is good to clean up the ItemTypeLibraryViewModel
. I am deferring filtering on BaseItemKind
due to some issues I observed during testing.
No worries at all! Your changes make a ton of sense. Thank you for the revisions this looks great! |
Summary
The goal of this. PR is to touch up the
ItemLibraryViewModel
to accommodate some of the new items that we've added since it was created. @LePips left some notes in in there andItemTypeLIbraryViewModel
and mostly I am going to try and follow them.Primary change was I removed
ItemTypeLIbraryViewModel
and movedItemType
to the theItemFilterCollection
instead. I've tested on tvOS and all libraries are correct including the theItemType
sections for TV Shows and Movies. Because of this, we are still able use a single ViewModel for both existing Library types we have on iOS and tvOS.This PR is based on: #1409 (review)