feat(android): cast round 2 — always-visible cast button, album autoplay, chronology, day headers #1228
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/android-cast-ux-round2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec 060 round 2 after the hardware-verified cast ship (#1220/#1221/#1227). Four Android UX changes, no backend/web changes, no new dependencies, no new strings.
1. Cast button on every main screen top bar
CastRouteButtonmounted in: TimelineHeader, AlbumsHeader, person DetailHeader, SearchScreen header row, BackupHeader, UploadActivityTopBar, and trailing in Map's chips row.CastControllerthreaded throughMemoriesAppcall sites.CastRouteButton.darkBackgroundnow defaults to the currentMaterialThemesurface's luminance (white glyphs on dark surfaces, dark glyphs on light), so the in-screen placements follow the theme without per-site literals; the media viewer keeps its explicittrue(black overlay bar).TimelineScreentakescast: CastController? = null— the add-photos picker replaces the header, so it stays untouched and shows no button.2. Album auto-start (spec 060 T013 follow-up)
shouldAutoStartSlideshow(castConnected, hasItems, slideshowActive, alreadyFired)(JVM-tested): one fire per screen entry (freshrememberper visit), never over a live run (manual start or a run surviving rotation), never before items are loaded. Leaving the screen still stops the run (existing DisposableEffect); returning is a new entry and starts a fresh run.sortedChronologically()).3. Album chronological order
AlbumChronology.kt:sortedChronologically()— stable sort by parsed captureInstant(ISO Z and offset forms), undated/unparseable last keeping relative input order;groupedByCaptureDay(zone)— capture-day buckets, oldest day first, undated trailing.AlbumDetailViewModelsorts at load (and re-sorts afteraddItems), so grid, viewer pager and slideshow share one chronological list.4. Sticky day headers in the album
DayHeaderbecameinternaland now takes(localDate, itemCount)(the only fields it used) — reused, not duplicated; locale-aware day formatting and the undated label come along for free, so no new strings.LazyVerticalGridwithstickyHeaderper day +items(day.items), same 3-column cells andAlbumCellselection behavior.Verification
From
apps/android:./gradlew :app:testDebugUnitTest :app:assembleDebug→ BUILD SUCCESSFUL, 472 tests, 0 failures (new:AlbumChronologyTest9 tests,AlbumAutoStartTest5 tests, plus 2 newAlbumDetailViewModelTestcases;FakeMemoriesApigained an additiveaddAlbumItemCaptureTimestamphook).