Skip to content

[PC TV] Add Mark as Unplayed episode action#4699

Merged
SergioEstevao merged 4 commits into
release/8.16from
alex/tv-mark-as-unplayed
Jul 8, 2026
Merged

[PC TV] Add Mark as Unplayed episode action#4699
SergioEstevao merged 4 commits into
release/8.16from
alex/tv-mark-as-unplayed

Conversation

@kean

@kean kean commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
📘 Part of: #

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 posted episodePlayStatusChanged, and the tvOS row view model never observed it. Fixed both so the action label stays in sync.

To test

  1. On tvOS, open a podcast and long-press/select the "..." on an unplayed episode.
  2. Confirm the menu shows "Mark as Played"; tap it, then reopen the menu and confirm it now shows "Mark as Unplayed".
  3. Tap "Mark as Unplayed" and confirm the episode reverts to unplayed (menu shows "Mark as Played" again).
  4. Play an episode all the way to the end without manually marking it played, then open its "..." menu and confirm it shows "Mark as Unplayed" (this previously stayed stuck on "Mark as Played").
Screenshot 2026-07-07 at 5 06 53 PM

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics.

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.
Copilot AI review requested due to automatic review settings July 7, 2026 21:08
@kean kean requested a review from a team as a code owner July 7, 2026 21:08
@kean kean added this to the 8.17 milestone Jul 7, 2026
@kean kean requested review from SergioEstevao and removed request for a team July 7, 2026 21:08
@kean kean modified the milestones: 8.17, 8.16 ❄️ Jul 7, 2026
@kean kean changed the base branch from trunk to release/8.16 July 7, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.episodePlayStatusChanged when playback finishes to keep UI in sync.
  • Observe episodePlayStatusChanged in the tvOS EpisodeRowViewModel to 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() } }
@kean kean force-pushed the alex/tv-mark-as-unplayed branch from cb80e2d to e4a26bc Compare July 7, 2026 21:11
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is assigned to the milestone 8.16 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@SergioEstevao SergioEstevao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Working correctly and thanks for fixing the refresh!

@SergioEstevao SergioEstevao enabled auto-merge July 8, 2026 07:48
@SergioEstevao SergioEstevao merged commit 0f29caa into release/8.16 Jul 8, 2026
4 checks passed
@SergioEstevao SergioEstevao deleted the alex/tv-mark-as-unplayed branch July 8, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants