Skip to content

Conversation

@bjtitus
Copy link
Contributor

@bjtitus bjtitus commented Oct 7, 2025

Fixes PCIOS-175

There are two primary fix attempts here:

  • Make sure we are fetching and passing shouldSubscribe when we call serverPodcastManager.addFromUuid. Otherwise, we could potentiall subscribe to a Podcast which the server already told us is unsubscribed.
  • When importing a podcast, we seemed to be setting subscribed based on the isDeleted value. It seems like we should also use subscribed if only it exists. I'm not 100% sure on why we ever use isDeleted, but I decided to keep that for now. It only happens in specific cases where checkIsDeleted is true but this might be something to look at in the future.

To test

  • Use two devices to test syncing
  • Subscribe to a podcast on one device
  • Refresh in the Profile tab to sync
  • Unsubscribe on another device
  • Refresh in the Profile tab to sync
  • Verify that podcasts are properly synced and removed from lists

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 spreadsheet to reflect any new or changed analytics.

bjtitus added 11 commits October 2, 2025 20:33
Ensure sync progress notifications always fire: Wraps importPodcast’s progress counter updates in a defer so every exit path still posts syncProgressPodcastUpto and syncProgressPodcastCount, preserving UI accuracy when we return early.
This allows us to more easily bail out with early returns in cases where we may want to (podcast is deleted or unsubscribed)
Respect server subscription intent for new podcasts: Adds a derived shouldSubscribe flag and passes it through to addFromUuid, preventing re-subscribing podcasts the server reports as unsubscribed.

We could also short-circuit the addFromUUID call on shouldSubscribe being false but I figured we may be better off keeping that functionality as is.
Uses the subscribed value instead of updating to isDeleted. This should help in case we only receive subscribed and not isDeleted. We won't want to set subscribed to 0 when isDeleted is missing but subscribed is 0
@bjtitus bjtitus added the sync Issues related to sync between platforms label Oct 7, 2025
@bjtitus bjtitus added this to the 7.100 milestone Oct 7, 2025
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@bjtitus bjtitus changed the title Podcast re-subscriptions fix Podcast re-subscription fix Oct 7, 2025
@bjtitus
Copy link
Contributor Author

bjtitus commented Oct 7, 2025

Closed in favor of #3550

@bjtitus bjtitus closed this Oct 7, 2025
@bjtitus bjtitus deleted the bjtitus/resubscribe-issues branch October 16, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sync Issues related to sync between platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants