-
Notifications
You must be signed in to change notification settings - Fork 578
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
Feature: episode sort button #1565
base: master
Are you sure you want to change the base?
Feature: episode sort button #1565
Conversation
- Add sort button next to episode count - Implement ascending/descending episode sort toggle - Add sort direction indicator (▲/▼) to button text - Make sort button visible when episodes are loaded - Position sort button after episode count text
- Only show rating sort options when episodes have rating data - Only show air date sort options when episodes have air date data - Episode number sorting always available - Improved sort button text to reflect available options - Fallback to episode sorting when selected sort data unavailable
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.
The code generally looks good.
It does not support TV, is this intentional or work in progress?
Edit: I was wrong with my earlier assumption
app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt
Outdated
Show resolved
Hide resolved
- Remove usage of requireContext() and requireActivity() - Use safe context handling with view.context - Consolidate string resources using format arguments - Add null safety checks for activity and context - Remove redundant dialog configuration - Improve sort options handling with conditional visibility - Fix dialog showing logic - Add empty list check to disable sort options when no episodes
Yes it does not support TV, ill send a new PR for TV, having trouble getting the extensions installed on emulator TV |
Worked well when testing, however we might want to |
- Set sort button to always appear at the end of its row - Add proper margin spacing to sort button and episodes text - Use FlexboxLayout's justifyContent and layout_order attributes - Ensure consistent margins across UI elements
Feature: Sort Button with Existing Theming
Fixes #958 #1069
This PR introduces a Sort Button that allows users to sort episodes based on different criteria. By default, it displays sorting options for episode number (ascending/descending) and, if available, rating and air date.
Key Changes:
• Added a Sort Button to trigger the sorting dialog.
• Uses the same styling as the existing Season Selection Dialog (AlertDialogCustom).
• Ensures sorting options include:
• Episode Number (Asc/Desc) - Always available
• Rating (High-Low / Low-High) - Only if episodes have ratings
• Air Date (Newest-Oldest / Oldest-Newest) - Only if episodes have air dates
This change maintains UI consistency while improving the sorting functionality.