Skip to content

Commit

Permalink
Update PaymentAuthWebViewActivity back button behavior (#2554)
Browse files Browse the repository at this point in the history
If `PaymentAuthWebViewActivity`'s `WebView` can go back, do that instead
of finishing the Activity.
  • Loading branch information
mshafrir-stripe authored Jun 8, 2020
1 parent 5a420bb commit 27b7d6e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ class PaymentAuthWebViewActivity : AppCompatActivity() {
}

override fun onBackPressed() {
cancelIntentSource()
if (viewBinding.authWebView.canGoBack()) {
viewBinding.authWebView.goBack()
} else {
cancelIntentSource()
}
}

private fun cancelIntentSource() {
Expand Down

0 comments on commit 27b7d6e

Please sign in to comment.