Fix the Playback Effects icon disappearing when a podcast has no colours yet - #5877
Conversation
…when a podcast has no extracted colors
Reviewing PR #5877
|
|
Claude finished @sztomek's task in 3m 32s —— View job ReviewThe diagnosis holds: Non-blocking
Nits
|
|
Claude finished @sztomek's task in 33s —— View job ReviewSince my last review the only change is |

Description
On the Now Playing screen, the Playback Effects icon was sometimes missing from the actions shelf. Its slot was still there — it just showed nothing, while all the other icons were fine.
The effects icon is drawn using the podcast's accent colour (the same colour the player uses for its highlights). When playback effects are turned on, the icon is tinted with that colour. The catch is that a podcast's colours are filled in later — after they're fetched from the server or worked out from the artwork. Until then the colour value is
0, which is fully transparent, so the icon was being painted with an invisible colour and vanished. Every other shelf icon uses a fixed theme colour, so they stayed visible. This is also why it came and went on its own: once the podcast's colours were populated, the icon reappeared.The rest of the app already handles this.
getTintColor()falls back to a visible default colour when a podcast has no colours yet, but the player was usinggetPlayerTintColor(), which returned the raw value with no fallback.The fix is to build the player tint from the same guarded
getTintColor(). For podcasts that already have colours nothing changes; for podcasts without colours yet the accent now falls back to a visible colour instead of being transparent. The now-unusedgetPlayerTintColor()is removed.Fixes #5529
Fixes PCDROID-652 https://linear.app/a8c/issue/PCDROID-652/playback-effects-icon-missing-beta-815-rc-2-9437
Testing Instructions
This is hard to trigger by hand because it only happens in the short window before a podcast's colours have been fetched, with playback effects enabled. The behaviour is covered by a unit test:
./gradlew :modules:services:compose:testDebugUnitTestPodcastColorsTestchecks that a podcast with no extracted colours produces a visible (opaque) player tint, and that a podcast with a real colour keeps it.Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...