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 loading state overlapping error dialog in drop-in #1895

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

OscarSpruit
Copy link
Contributor

Description

  1. Override this in the drop in service:
override fun onBalanceCheck(paymentComponentState: PaymentComponentState<*>) {
    val result = handleBalanceResponse(null)
    sendBalanceResult(result)
}
  1. Open drop-in
  2. Do a gift card payment
  3. Aaaand you're now stuck on a loading state with an error dialog behind it...

The issue is fixed by using showNow() when showing the loading state fragment. An extra improvement is to always dismiss the loading state when we get back a result from the merchant. Before we only dismissed the loading state in some specific places.

Checklist

  • PR is labelled
  • Changes are tested manually

COAND-984

@OscarSpruit OscarSpruit added the Fix [PRs only] Indicates a bug fix label Nov 19, 2024
@OscarSpruit OscarSpruit requested a review from a team as a code owner November 19, 2024 16:15
This makes sure we are able to always find the loading dialog when we want to dismiss it. Solving an issue where the loading fragment would be presented on top of the error dialog.

COAND-984
COAND-984
@OscarSpruit OscarSpruit force-pushed the fix/loading-state-overlapping-error branch from dcf1014 to 3a70336 Compare November 26, 2024 08:58
Copy link

✅ No public API changes

Copy link

sonarcloud bot commented Nov 26, 2024

@OscarSpruit OscarSpruit merged commit 444305c into develop Nov 27, 2024
11 checks passed
@OscarSpruit OscarSpruit deleted the fix/loading-state-overlapping-error branch November 27, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix [PRs only] Indicates a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants