Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing episodes with unfollowed podcasts #3546

Merged
merged 5 commits into from
Feb 6, 2025

Conversation

geekygecko
Copy link
Member

@geekygecko geekygecko commented Feb 5, 2025

Description

Internal reference p1738686765061199-slack-C02A333D8LQ

There's an issue that if:

  • You aren't following a podcast.
  • It was added to the database (viewed in Discover) over 7 days ago.
  • Have interacted with it, such as starred, archived, downloaded, completed, listened to, or have it in your Up Next.

It won’t delete the podcast from your database but will delete all the other episodes you haven’t interacted with. If the user goes back to the podcast page the episodes won't be added back to the podcast.

Testing Instructions

To be able to repeat this issue you need to make the following code change as it only happens to podcasts added over a week ago.

  1. Apply this patch
  2. Be signed out
  3. Tap the Discover tab
  4. Subscribe to one podcast (so refresh runs later)
  5. Go to the podcast page for a podcast you aren't following
  6. Play and archive an episode
  7. Tap the Profile tab
  8. Manually refresh
  9. Go back to the podcast page
  10. ✅ Verify all the episodes that haven't been interacted with are still available

Screenshots

Example of the issue:

Before a clean up The issue happening
Screenshot_20250206_224649 Screenshot_20250206_224709

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 spreadsheet 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

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Feb 5, 2025

📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
App Name 📱 Mobile
Build TypedebugProd
Commitec56b5d
Direct Downloadpocketcasts-app-prototype-build-pr3546-ec56b5d.apk
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
App Name 🚗 Automotive
Build TypedebugProd
Commitec56b5d
Direct Downloadpocketcasts-automotive-prototype-build-pr3546-ec56b5d.apk
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
App Name ⌚ Wear
Build TypedebugProd
Commitec56b5d
Direct Downloadpocketcasts-wear-prototype-build-pr3546-ec56b5d.apk

@geekygecko geekygecko added this to the 7.83 milestone Feb 5, 2025
val oneWeekAgo = calendar.time
if (addedDate != null && addedDate > oneWeekAgo) {
val oneWeekAgoMs = System.currentTimeMillis() - 7.days.inWholeMilliseconds
if (addedDate != null && addedDate.time > oneWeekAgoMs) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't change any logic it only simplifies the code.

@geekygecko geekygecko force-pushed the task/fix-missing-episodes branch from 91e9be0 to ec56b5d Compare February 6, 2025 12:26
@geekygecko geekygecko marked this pull request as ready for review February 6, 2025 12:26
@geekygecko geekygecko requested a review from a team as a code owner February 6, 2025 12:26
@geekygecko geekygecko requested review from mebarbosa and removed request for a team February 6, 2025 12:26
@mebarbosa mebarbosa enabled auto-merge (squash) February 6, 2025 12:38
@mebarbosa mebarbosa merged commit 3dc653f into main Feb 6, 2025
16 of 17 checks passed
@mebarbosa mebarbosa deleted the task/fix-missing-episodes branch February 6, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Area] Refresh Podcasts [Type] Bug Not functioning as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants