Skip to content

Fix the Playback Effects icon disappearing when a podcast has no colours yet - #5877

Merged
sztomek merged 4 commits into
mainfrom
fix/pcdroid-652-effects-icon-invisible-tint
Sep 9, 2026
Merged

Fix the Playback Effects icon disappearing when a podcast has no colours yet#5877
sztomek merged 4 commits into
mainfrom
fix/pcdroid-652-effects-icon-invisible-tint

Conversation

@sztomek

@sztomek sztomek commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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 using getPlayerTintColor(), 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-unused getPlayerTintColor() 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:

  1. ./gradlew :modules:services:compose:testDebugUnitTest
  2. PodcastColorsTest checks that a podcast with no extracted colours produces a visible (opaque) player tint, and that a podcast with a real colour keeps it.

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@claude

claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Reviewing PR #5877

  • Read PR diff
  • Read Podcast.kt tint helpers and PodcastColors usages
  • Check every consumer of playerTint for behaviour changes
  • Post review

View job run · branch fix/pcdroid-652-effects-icon-invisible-tint

@sztomek sztomek added [Type] Enhancement Improve an existing feature. [Area] Player UI Full screen player or mini player UI issue labels Sep 8, 2026
@sztomek sztomek added this to the 8.21 milestone Sep 8, 2026
@sztomek
sztomek marked this pull request as ready for review September 8, 2026 12:14
@sztomek
sztomek requested a review from a team as a code owner September 8, 2026 12:14
@sztomek
sztomek requested review from geekygecko and removed request for a team September 8, 2026 12:14
@claude

claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 3m 32s —— View job


Review

The diagnosis holds: PlayerHeaderFragment.podcastColorsFlow() (PlayerHeaderFragment.kt:583) builds PodcastColors(podcast) directly, so before colours land playerTint was Color(0) and ThemeColor.playerHighlight01 returns that raw value for most themes — a fully transparent effects icon. Routing through getTintColor(isDarkTheme = true) also lines the Compose path up with the legacy one, which already used getTintColor(true) via Theme.playerHighlightColor() (Theme.kt:330). getPlayerTintColor has no remaining callers anywhere in the repo, including wear, automotive and tv. No blocking issues.

Non-blocking

  • modules/services/compose/src/main/java/au/com/shiftyjelly/pocketcasts/compose/PodcastColors.kt:20 — podcasts whose stored dark tint is exactly the server default #C62828 will now show white player highlights (seek bar, active shelf icons, bookmark accents) instead of red, because darkThemeTint() treats that value as unset; this matches the legacy path but contradicts "for podcasts that already have colours nothing changes", so confirm it's intended and mention it in the description. (thread)

Nits

  • modules/services/compose/src/test/java/au/com/shiftyjelly/pocketcasts/compose/PodcastColorsTest.kt:18 — the alpha assertion is redundant with the Color.White check, and the sentinel case (#C62828) that also changes behaviour isn't covered. (thread)
    · branch fix/pcdroid-652-effects-icon-invisible-tint

@geekygecko geekygecko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix!

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Claude finished @sztomek's task in 33s —— View job


Review

Since my last review the only change is 57e844d, which adds a PodcastColorsTest case for the #C62828 server-default dark tint asserting it maps to Color.White — that confirms the sentinel behaviour I flagged as non-blocking is intended, and the constant matches DEFAULT_SERVER_DARK_TINT_COLOR/DEFAULT_DARK_TINT in Podcast.kt:337-339. Nothing new and nothing open.
· branch fix/pcdroid-652-effects-icon-invisible-tint

@sztomek
sztomek merged commit 2b1bba4 into main Sep 9, 2026
20 checks passed
@sztomek
sztomek deleted the fix/pcdroid-652-effects-icon-invisible-tint branch September 9, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Player UI Full screen player or mini player UI issue [Type] Enhancement Improve an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playback Effects icon missing [beta 8.15-rc-2 (9437)]

2 participants