-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
feat: Support multiple filter selection #5478
Conversation
I think it's fine to change the preference key for the transition, I already did the same thing multiple times before when refactoring a preference. |
Co-authored-by: Bnyro <[email protected]>
app/src/main/java/com/github/libretube/ui/sheets/FilterSortBottomSheet.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/libretube/ui/fragments/SubscriptionsFragment.kt
Outdated
Show resolved
Hide resolved
Looks pretty good and well overthought from the UI/UX perspective, only left some recommendations for the code implementation, which would make things a bit cleaner overall 👍 Thank you for looking into this! |
Awsome! |
That's on @SameenAhnaf , he's the one that proposed that UI 💪 |
Thank you for the review Bnyro! I hope I have not forgotten any of the changes we discussed 😊 |
app/src/main/java/com/github/libretube/ui/fragments/SubscriptionsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/libretube/ui/sheets/FilterSortBottomSheet.kt
Show resolved
Hide resolved
app/src/main/java/com/github/libretube/ui/sheets/FilterSortBottomSheet.kt
Outdated
Show resolved
Hide resolved
The above suggestions (except the SVG thing) are only a small refactor to avoid crashes when the bottom sheet is being recreated, since the |
Hey Bnyro, thank you for catching this issue. It would lead to some unnecessary crashes... Updated the icon's formatting + passed the parameters through arguments. One point to note. I was not able to use the recommended |
Sure 👍 I didn't test the code at all before commenting, it was just more of a general hint how I'd imagine the changes to be :) |
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.
Lgtm now, thank you!
Would you mind rebasing squashing your commits into two or three so that we can make the history of commits cleaner. Or should I just squash the whole PR into one commit when merging?
Yeah go ahead! I just like committing multiple times to keep track of what was done (it helps me with the PR description). |
What does this PR do?
Notes
Transition
Fixing the typo on the filter preference key results in resetting the users' current filter preference. This is intended since it greatly simplifies the logic to support multiple filters. If we decide that we want to transition to multiple filter support without a reset, that can be achieved by reverting the typo fix + adjusting the following property on ContentFilter.kt:
If you think it is worth it, we can go ahead and add support for a transition from the currently selected filter.
Showcase
sample.mp4
Closing Notes
Thank you for reviewing! Please let me know if you disagree with the approaches I chose.