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

Remove Activity from PayPalClient #875

Merged
merged 4 commits into from
Jan 4, 2024
Merged

Conversation

sarahkoop
Copy link
Contributor

Summary of changes

  • Remove FragmentActivity parameter from PayPalClient methods in favor of Context
  • Move assertCanPerformBrowserSwitch from PayPalClient to PayPalLauncher since the launcher handles starting the browser switch now

Checklist

  • [ ] Added a changelog entry

Authors

@sarahkoop sarahkoop requested a review from a team as a code owner January 3, 2024 22:43
Copy link
Collaborator

@tdchow tdchow left a comment

Choose a reason for hiding this comment

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

Changes look good 👍 Just curious, was there a need to previously take in a FragmentActivity?

@sarahkoop
Copy link
Contributor Author

sarahkoop commented Jan 4, 2024

Changes look good 👍 Just curious, was there a need to previously take in a FragmentActivity?

The device inspector methods take in a FragmentActivity parameter currently, but I think the client methods always could have passed Context instead. More PRs to come to update everything to the more generic ComponentActivity where an activity is needed since I don't think we ever used the FragmentActivity specific attributes.

@sshropshire
Copy link
Contributor

@tdchow @sarahkoop Happy New Year y'all!

2cents: Any need for an Activity reference is usually tied to allowing the Chrome Custom Tab to launch in the same task. The "launcher" pattern we've been introducing should make Feature Clients only need a Context to access shared prefs, etc. which would be really clean.

@sarahkoop sarahkoop merged commit 19412cd into v5 Jan 4, 2024
3 checks passed
@sarahkoop sarahkoop deleted the paypal_client_remove_activity branch January 4, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants