[PC TV] Add Mark as Unplayed episode action#4699
Merged
Merged
Conversation
Toggles the existing tvOS "Mark as Played" episode action based on played state, and fixes the row not refreshing after playback completes naturally by posting episodePlayStatusChanged from PlaybackManager and observing it in EpisodeRowViewModel.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a tvOS episode context-menu action to toggle play state (“Mark as Played” / “Mark as Unplayed”), and fixes tvOS UI state refresh when an episode completes playback naturally by emitting and observing episodePlayStatusChanged.
Changes:
- Add “Mark as Unplayed” action and tvOS toast messaging, toggled based on the episode’s played state.
- Post
Constants.Notifications.episodePlayStatusChangedwhen playback finishes to keep UI in sync. - Observe
episodePlayStatusChangedin the tvOSEpisodeRowViewModelto refresh the row model when play state updates.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| podcasts/PlaybackManager.swift | Posts episodePlayStatusChanged when an episode completes naturally so downstream UIs can refresh. |
| podcasts/en.lproj/Localizable.strings | Adds new localized strings for “Mark as Unplayed” and the tvOS confirmation toast. |
| Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift | Adds unplayed action + observes play-status notifications to reload the episode model. |
| Pocket Casts TV App/UI/Podcasts/EpisodeRow.swift | Toggles the context-menu action label and behavior between played/unplayed. |
| CHANGELOG.md | Adds a release note entry for the new tvOS action. |
| Button(L10n.playNextInUpNext) { requireAccount { model.playNext() } } | ||
| Button(L10n.playLastInUpNext) { requireAccount { model.playLast() } } | ||
| Button(L10n.markPlayed) { requireAccount { model.markAsPlayed() } } | ||
| Button(model.isPlayed ? L10n.markUnplayed : L10n.markPlayed) { requireAccount { model.isPlayed ? model.markAsUnplayed() : model.markAsPlayed() } } |
cb80e2d to
e4a26bc
Compare
Collaborator
SergioEstevao
approved these changes
Jul 8, 2026
SergioEstevao
left a comment
Contributor
There was a problem hiding this comment.
Working correctly and thanks for fixing the refresh!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes POC-746
Adds a "Mark as Unplayed" action to tvOS's episode context menu, toggling with the existing "Mark as Played" action based on the episode's played state (same pattern already used for Archive/Unarchive).
While testing, found that the row's played state never refreshed after an episode finished playing naturally (as opposed to tapping "Mark as Played"), because
PlaybackManager.playerDidFinishPlayingEpisode()never postedepisodePlayStatusChanged, and the tvOS row view model never observed it. Fixed both so the action label stays in sync.To test
Checklist
CHANGELOG.mdif necessary.