Repository navigation
feat(app): split up to date progress filter into up to date and ended - #354
Conversation
|
Hi and thanks for the PR, If you wish to introduce something new into the app that's NOT already available in the website please open PR for the web first - or even better start with an Github issue or Featurebase request. This way tokens and time will not be wasted ;) If you spot something thats already on web but not yet in the app then PR is welcome surely. If this one contains something like this partially please extract this in a new separate smaller one. Thanks! This info should be available in the readme actually. I will be adding this now and also copy this message to other PRs. |
|
For this one specifically this is something we would need to introduce on the backend/api side first but I agree with the idea in general. |
|
Thanks for the steer - I took it to the web first. trakt/trakt-web#3210 (feature request) and trakt/trakt-web#3211 (implementation) now cover the split there. Checking the endpoint against my account while writing that up settled the API question: the split needs no API change. The web already maps that value onto On this PR: I have reduced it to the split alone - the counts and the settings toggle are gone, since those were the part that would have needed server-side work. What is left is just the filter. |
f460eb3 to
79e94e3
Compare
|
Reduced this to the split alone, as promised above. 26 files / +445 -204 → 10 files / +112 -24. Gone: the per-chip counts, the What is left needs no API change: both filters read the same One thing worth flagging, since it was easy to get wrong. Partitioning a page client-side shrinks it, and the pager decided Same change is up for the web in trakt/trakt-web#3211, following the parity guidance. |
|
Update on the parity condition: the web counterpart has landed. trakt/trakt-web#3211 was approved by @Marius-TV and merged into
So the web is now the reference implementation and this PR mirrors it rather than leading it. Naming matches ( Happy to rebase or adjust anything here if you would rather this track the merged web version more closely in any particular detail. |
79e94e3 to
91ec0ef
Compare
|
@michaldrabik the parity condition you raised is now cleared, and this PR is ready on the Android side. Web: trakt/trakt-web#3211 was approved by @Marius-TV and merged into Android: this PR mirrors that implementation - same naming ( Just rebased onto Happy to adjust anything if you would rather it track the merged web version more closely in some detail. |
The "Up to date" filter answers two questions at once. It lists every show whose aired episodes are all watched, so a series that wrapped up years ago sits next to one that is still airing and simply has nothing unwatched right now. From the progress list there is no way to tell them apart without opening each show. The up next endpoint returns the show status already, so the split needs no API change. Both filters read the same completed bucket and partition it on that status; an unknown status counts as still airing, which preserves today's behaviour. Paging keys off the number of items the endpoint returned rather than the number left after the split, so a page that filters down to fewer than the page limit does not end pagination early.
91ec0ef to
aaaba6f
Compare
Closes #353
Scoped to the split alone: no counts, no settings toggle, no API change. Mirrors trakt/trakt-web#3211, which does the same thing on the web.
Why
The
Up to datefilter in Profile > Progress answers two different questions at once. It returns every show whose aired episodes are all watched, so a series that wrapped up years ago sits next to a series that is still airing and simply has nothing unwatched right now. From the Progress section there is no way to tell which shows are actually finished without opening each one.What changed
Up to datebecomes two filters: Up to date (still airing, caught up) and Ended (statusendedorcanceled).In progressandDroppedare untouched.up_next_nitroreturns the full show object withstatus, so both filters read the sameintent=completedbucket and partition it on that status. Verified against the live API: 16 completed, 10ended, 6returning series, 0 without a status.Show.hasEndedsits in:commonnext toShow.isReleased, since it is a question about a show rather than about this screen. An unknown status counts as still airing, which preserves today's behaviour.hasMoreDatafrom the size of what it received. Left alone, a page of 100 completed shows that filters down to 8 ended ones would have ended pagination early.ProgressPagecarries the count the endpoint actually returned alongside the filtered items, and the pager reads that.ProgressFiltersalready iteratesProgressFilter.entries, so adding the enum entry is enough.ic_flag_checkeralready existed.ProgressFilterentryCompletedbecameUpToDate, so a stored"Completed"no longer parses.GetProgressFilterUseCasealready falls back to the default on an unknown value, and the default isUpToDate, which carries the same label users saw before. No migration needed.Localisation
No new translatable keys.
Up to datekeepsbutton_text_progress_completedandEndedreusestranslated_value_status_ended, both already translated in every locale, so this ships localised rather than waiting on a Crowdin round trip.Notes
One consequence of partitioning client-side: the profile Progress row asks for
PROGRESS_SECTION_LIMITitems and then splits them, so that preview row can show fewer than the limit. The all-progress screen is unaffected, since it pages. Calling it out rather than hiding it; the alternative would be over-fetching to fill the row, which is not worth it for a preview.Testing
./gradlew :app:compileInternalDebugKotlinclean, ktlint 1.7.1 (the version CI runs) clean.