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

Refactor open episode deep linking #2455

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Conversation

MiSikora
Copy link
Contributor

@MiSikora MiSikora commented Jul 5, 2024

Description

Note

This will be a series of PRs that move deep linking to a separate module that can be tested. The goal is to address #2405 but I don't want to do it blindly without having tests in order to not introduce regressions to deep linking.

This PR migrates opening episode deep linking to the new module.

Testing Instructions

Regular deep link

  1. Subscribe to The Daily.
  2. Close the app.
  3. Execute adb shell am start -n au.com.shiftyjelly.pocketcasts.debug/au.com.shiftyjelly.pocketcasts.ui.MainActivity -a INTENT_OPEN_APP_EPISODE_UUID -e episode_uuid ebc07cd8-10b6-4ca6-bfae-2994ee215012.
  4. A page for this episode should open.

Notifications deep link

  1. Subscribe to some podcasts.
  2. Enable notifications for them.
  3. Trigger new episode notification from the Developer menu.
  4. Tapping on notifications should navigate you to episode details.

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.

@MiSikora MiSikora added this to the 7.69 milestone Jul 5, 2024
@MiSikora MiSikora requested a review from a team as a code owner July 5, 2024 10:37
@MiSikora MiSikora requested review from ashiagr and removed request for a team July 5, 2024 10:37
@dangermattic
Copy link
Collaborator

dangermattic commented Jul 5, 2024

1 Warning
⚠️ Class ShowEpisodeAdapter is missing tests, but unit-tests-exemption label was set to ignore this.

Generated by 🚫 Danger

Copy link
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +124 to +126
// We match on this pattern to handle notification intents that add numbers to actions for pending intents
private val ACTION_REGEX = ("^" + ACTION_OPEN_EPISODE + """\d*$""").toRegex()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this!

@MiSikora MiSikora force-pushed the task/podcast-open-deep-linking branch from b597e3c to b50371c Compare July 8, 2024 21:40
Base automatically changed from task/podcast-open-deep-linking to main July 8, 2024 22:04
@MiSikora MiSikora force-pushed the task/episode-open-deep-linking branch from c498c0a to fee234c Compare July 8, 2024 22:04
@MiSikora MiSikora enabled auto-merge (squash) July 8, 2024 22:04
@MiSikora MiSikora merged commit 9535105 into main Jul 8, 2024
13 of 14 checks passed
@MiSikora MiSikora deleted the task/episode-open-deep-linking branch July 8, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants