Skip to content

Polish: ContentType enum consistency + PulsingLiveDot + minor idiom cleanups #52

Description

@Yokomoko

Catch-all for the smaller cleanups flagged in the review. Each is independently trivial but they share the theme of "tidy while in the neighbourhood".

From various: architect.md #13, quality.md #10, #11, #12, idioms.md #6, #7, perf.md #12, #15

  • ContentType enum: ContentType.kt exists but every DB/UI site uses raw "live"/"movie"/"show" strings. Add .dbValue and roll out. (arch 'More Like This' rail on detail screens #13, quality Background sync via WorkManager #10)
  • PulsingLiveDot: rememberInfiniteTransition fires a 800ms scale animation every frame while Live tab visible — 3 concurrent animation sources on the screen. Switch to RepeatMode.Reverse with 1200ms cycle, or replace scale with alpha pulse. (perf Audio track selection (multi-language) #12)
  • EpgChannelMatcher mutable state: has var totalResolved, var totalMissed, val loggedMisses = mutableSetOf() mutated on every resolve() — not thread-safe if called concurrently. Move diagnostic counting out or use AtomicInteger. (quality Favourite channel zapping (Sky-style) #11)
  • M3uParser.currentExtinf!! after null-check: smart-cast blocked by mutable var. Copy to local val or use let block. (quality Audio track selection (multi-language) #12)
  • HomeViewModel.isInWatchlist() redundant: uses .first() on a Flow while watchlist: StateFlow already exists on the same VM. Delete and have callers check watchlist.value. (idioms Last-watched channel memory #6)
  • Two LaunchedEffect(Unit) in Shell.kt for unrelated effects: replace with named keys like LaunchedEffect("splashTimeout") and LaunchedEffect("initialFocus"). (idioms Stream error recovery (auto-retry) #7)
  • Shell.kt holds second HomeViewModel subscription just for splash dismiss. Move the "first data arrived" signal into EnrichmentProgressTracker or a dedicated SplashViewModel. (perf Search result poster thumbnails #15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnice-to-havePolish — improves but not critical

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions