Skip to content

fix(home): show the tick right after marking a title from the long-press menu - #762

Merged
ProdigyV21 merged 5 commits into
ProdigyV21:mainfrom
ReichiMD:claude/trusting-brown-n73n9p
Sep 27, 2026
Merged

ProdigyV21 merged 5 commits into
ProdigyV21:mainfrom
ReichiMD:claude/trusting-brown-n73n9p

Conversation

@ReichiMD

Copy link
Copy Markdown
Contributor

Summary

The follow-up offered in #758: marking a film watched / unwatched from the Home long-press menu now puts the tick on (or takes it off) the card right away, and the menu offers the opposite action next time. Until now the tick only changed on the next return to Home, and until then the menu kept offering the same action.

Plus a comment-only fix in TraktRepository.initializeWatchedCache, which still said a profile without Trakt keeps empty caches.

Cause

toggleWatched updated the watched cache (optimistically, in markMovieWatched / markMovieUnwatched) and showed the toast, but nothing re-marked the cards. A plain tick pass would not have helped either: the rows are the very instances the last pass marked, so watchedBadgesPassIsRedundant rejects it inside the 90 s throttle.

Change

  • HomeViewModel.toggleWatched: right after the mark call, refreshWatchedBadgesAfterMark() runs the existing tick pass with immediate = true, force = true. No second marking path: hero, re-published rows and the profile check from 1663726 all stay on the one pass.
    • immediate runs it now, past the throttle.
    • force keeps a pass that freshly published rows restart on the short 300 ms delay. This matters in the next-episode branch, where refreshContinueWatchingOnly(force = true) re-publishes the rows while the pass is running.
  • Phone: the menu entry itself was hidden. On mobile the long-press menu docks at the bottom, but the app's bottom bar is drawn over the screen, so the last entry ("Watched", and "Remove" on Continue Watching cards) sat behind the bar and could not be tapped. The sheet now adds LocalBottomBarHeight, as the Discover filter panel already does since 5219111. TV uses the centred card and is unchanged.
  • The call sits before removeFromHistory, so the card shows what the cache holds even if a later step fails.
  • The next-episode branch (Continue Watching card) does the same. A show whose only episode so far was in progress is not "started" until that episode is marked, so its cards in other rows now get the tick with the Continue Watching update instead of after the 1.8 s pass delay.
  • TraktRepository: two comments corrected (KDoc and the inline comment on the "no remote data" branch). The cache is built from the local snapshot plus Cloud (or Trakt), MDBList and SIMKL; isolation comes from ensureProfileCacheScope, the per-profile snapshot keys and the Cloud's profile filter. Comments only, no code change in that file.

3 files, +22 / −4, three commits (tick fix, phone menu, comments).

Known limits (not changed here)

  • "Right away" means together with the toast. markMovieWatched writes the cache first but then awaits the Cloud/SIMKL sync before it returns. On a slow network the tick and the toast arrive after that. Splitting the local step from the sync would mean changing TraktRepository, which I kept out of this PR.
  • A show card in a normal row (not Continue Watching) has no nextEpisode, so "mark watched" ends with "No episode info available". Unchanged: it needs a design decision (which episode?), so I kept it out.

Testing

  • testSideloadDebugUnitTest + compileSideloadDebugKotlin green locally; the test-APK run on the fork is green as well.
  • No new unit test: the change is a call inside toggleWatched, and exercising it needs the whole HomeViewModel. The decisions it relies on (watchedBadgesPassIsRedundant with force, watchedBadgesPassDelayMs, withWatchedBadges for rows and hero) are covered in HomeWatchedBadgesTest.
  • Device (phone, phone layout, profile without Trakt): long-press a film → Watched → the tick is on the card right away; long-press again → the menu offers Unwatched → the tick is gone right away. Before this PR the Watched entry could not be reached on the phone at all (hidden behind the bottom bar). Continue Watching was not tested on the device (no such row on the test profile).
  • Screenshots (phone, long-press menu), before: the Watched entry sits behind the bottom bar · after: all four entries:
Screenshot_20260926-205135 Screenshot_20260926-205045

created by Claude (Anthropic) on behalf of @ReichiMD

…ess menu

Marking a film watched or unwatched from the Home long-press menu only
updated the watched cache and showed the toast; no card was re-marked,
and a plain tick pass would be skipped because the rows are the ones the
last pass marked. The tick (card and hero) only changed on the next
return to Home, and the menu kept offering the old action until then.

After the mark call, toggleWatched now forces the existing tick pass
(immediate, force) instead of writing the ticks itself, so hero,
re-published rows and the profile check all stay on the one path. The
next-episode branch does the same, so the show card in other rows gets
its tick together with the Continue Watching update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtiKMWmfLDYKRRb5CBptwd
…t Trakt

initializeWatchedCache said a profile without Trakt auth keeps empty
caches "so all content appears unwatched". The code always loads the
profile's local watched snapshot and adds Cloud, MDBList and SIMKL
history; profile isolation comes from ensureProfileCacheScope and the
per-profile snapshot keys. The inline comment on the no-remote-data
branch said the same and is corrected too. Comments only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtiKMWmfLDYKRRb5CBptwd
On phones the Home long-press menu docks at the bottom of the screen,
but the app's bottom bar is drawn over it, so the last entries ("Watched",
and "Remove" on Continue Watching cards) sat behind the bar and could not
be tapped. The sheet now adds LocalBottomBarHeight to its bottom padding,
as the Discover filter panel does since 5219111. The TV card is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtiKMWmfLDYKRRb5CBptwd
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 26, 2026
@ProdigyV21

Copy link
Copy Markdown
Owner

Reviewed and integrated with the latest watched-cache fixes. This refreshes Home badges after a mark/unmark without requiring a return to Home, and keeps the mobile menu clear of the bottom bar. Home watched-badge tests pass in the 128-test batch; both Android variants compile. Original commits preserved.

@ProdigyV21
ProdigyV21 merged commit a9a5e59 into ProdigyV21:main Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants