-
Notifications
You must be signed in to change notification settings - Fork 644
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
Add keys to remember functions in FlowControllerCompose.kt and PaymentSheetCompose.kt #8480
Conversation
@@ -108,7 +108,7 @@ private fun internalRememberPaymentSheetFlowController( | |||
"PaymentSheet.FlowController must be created in the context of an Activity" | |||
} | |||
|
|||
return remember { | |||
return remember(paymentOptionCallback, paymentResultCallback) { |
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.
From #8466, @jaynewstrom-stripe you suggested including createIntentCallback, externalPaymentMethodConfirmHandler in here as well. Those are updated in their own LaunchedEffect
s which already should re-run when they change. I don't think we actually need to recreate PaymentSheet + FlowController as well. Lmk if I'm missing something though!
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.
Seems reasonable.
Diffuse output:
APK
|
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.
Might be worth a changelog callout.
Summary
Add keys to remember functions in FlowControllerCompose.kt and PaymentSheetCompose.kt
Motivation
Recreate PaymentSheet/FlowController if its parameters change
Testing
Changelog