Skip to content

Commit

Permalink
fix(bank-sdk): Restore the fragment listener after orientation change…
Browse files Browse the repository at this point in the history
… in `ClientGiniCaptureFragment`

BSDK-258
  • Loading branch information
a-szotyori committed Jan 19, 2024
1 parent 4b28f1a commit bd982de
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
}

Expand Down

0 comments on commit bd982de

Please sign in to comment.