-
Notifications
You must be signed in to change notification settings - Fork 650
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
Inject ConfirmationHandler
into FlowController
#9651
base: master
Are you sure you want to change the base?
Conversation
* stripeAccountId after creating a [DefaultFlowController]. | ||
*/ | ||
lazyPaymentConfiguration: Provider<PaymentConfiguration>, | ||
private val confirmationHandler: ConfirmationHandler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefaultFlowController
is a special case in which we can inject the ConfirmationHandler
directly since we create the FlowControllerViewModel
first.
Diffuse output:
APK
|
5cecfd1
to
188ae71
Compare
188ae71
to
2c615dd
Compare
statusBarColor = statusBarColor, | ||
) as T | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't been able to find a good way to not inject this through the view model when creating the ConfirmationHandler
. I haven't been a fan of the way we fetch the status bar color to handle a small web view case. I'm going to look into seeing if we should remove this or look for a better way of retrieving the status bar color.
@@ -29,7 +28,6 @@ internal class PaymentOptionContract : | |||
internal data class Args( | |||
val state: PaymentSheetState.Full, | |||
val configuration: PaymentSheet.Configuration, | |||
@ColorInt val statusBarColor: Int?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not being used by the PaymentOptionActivity
.
Summary
Inject
ConfirmationHandler
intoFlowController
Motivation
Allows for injecting a custom implementation of
ConfirmationHandler
if needed.Testing