From bd982def334c5966b0b7b9e298b2b24e843cff97 Mon Sep 17 00:00:00 2001 From: Alpar Szotyori Date: Fri, 19 Jan 2024 22:23:33 +0100 Subject: [PATCH] fix(bank-sdk): Restore the fragment listener after orientation change in `ClientGiniCaptureFragment` BSDK-258 --- .../bank/sdk/exampleapp/ui/ClientGiniCaptureFragment.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ClientGiniCaptureFragment.kt b/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ClientGiniCaptureFragment.kt index af34853d7d..1e4b7dd9d2 100644 --- a/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ClientGiniCaptureFragment.kt +++ b/bank-sdk/example-app/src/main/java/net/gini/android/bank/sdk/exampleapp/ui/ClientGiniCaptureFragment.kt @@ -9,6 +9,7 @@ import androidx.lifecycle.lifecycleScope import kotlinx.coroutines.launch import net.gini.android.bank.sdk.GiniBank import net.gini.android.bank.sdk.capture.CaptureConfiguration +import net.gini.android.bank.sdk.capture.CaptureFlowFragment import net.gini.android.bank.sdk.capture.CaptureFlowFragmentListener import net.gini.android.bank.sdk.capture.CaptureResult import net.gini.android.bank.sdk.capture.ResultError @@ -30,6 +31,10 @@ class ClientGiniCaptureFragment : super.onCreate(savedInstanceState) if (savedInstanceState == null) { checkCameraPermission() + } else { + val captureFlowFragment = + requireActivity().supportFragmentManager.findFragmentByTag("fragment_host") as? CaptureFlowFragment + captureFlowFragment?.setListener(this) } }