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

Send users directly to web when we do not support Native GPay #4898

Merged
merged 8 commits into from
Aug 29, 2024

Conversation

cooltey
Copy link
Collaborator

@cooltey cooltey commented Aug 27, 2024

https://phabricator.wikimedia.org/T373410

The idea is to use the current logic in the GooglePayViewModel that decides to show in the Donation dialog or CustomTab.

@cooltey cooltey requested a review from dbrant as a code owner August 27, 2024 23:29
Copy link
Member

@dbrant dbrant left a comment

Choose a reason for hiding this comment

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

Couldn't we just put all this logic in DonateViewModel? It's already doing most of the work for us. (i.e. in addition to checking isGooglePayAvailable(), you can also check if the country code is allowed.)

app/src/main/java/org/wikipedia/main/MainFragment.kt Outdated Show resolved Hide resolved
@cooltey
Copy link
Collaborator Author

cooltey commented Aug 28, 2024

Couldn't we just put all this logic in DonateViewModel? It's already doing most of the work for us. (i.e. in addition to checking isGooglePayAvailable(), you can also check if the country code is allowed.)

I moved the logic to DonateViewModel, it works great but the user will see the progress bar in the bottom sheet and then automatically redirect to the donation page. 🤔

@cooltey
Copy link
Collaborator Author

cooltey commented Aug 29, 2024

Thanks @dbrant

@cooltey cooltey merged commit 37de8f3 into main Aug 29, 2024
2 checks passed
@cooltey cooltey deleted the gpay-donation-design branch August 29, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants