Skip to content

Commit

Permalink
rememberPaymentLauncher
Browse files Browse the repository at this point in the history
  • Loading branch information
brnunes-stripe committed Jul 13, 2022
1 parent b30b8df commit 34fa9b3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ComposeExampleActivity : AppCompatActivity() {
fun ComposeScreen() {
val inProgress by viewModel.inProgress.observeAsState(false)
val status by viewModel.status.observeAsState("")
val paymentLauncher = createPaymentLauncher()
val paymentLauncher = rememberPaymentLauncher()

Column(modifier = Modifier.padding(horizontal = 10.dp)) {
if (inProgress) {
Expand Down Expand Up @@ -79,7 +79,7 @@ class ComposeExampleActivity : AppCompatActivity() {
* Create [PaymentLauncher] in a [Composable]
*/
@Composable
fun createPaymentLauncher(): PaymentLauncher {
fun rememberPaymentLauncher(): PaymentLauncher {
val context = LocalContext.current
val settings = remember { Settings(context) }
return PaymentLauncher.rememberLauncher(
Expand Down

0 comments on commit 34fa9b3

Please sign in to comment.