Skip to content

Commit

Permalink
feat(bank-sdk): Skonto feature. Fix Skonto appearance condition
Browse files Browse the repository at this point in the history
PP-377
  • Loading branch information
ndubkov-distcotech committed Jul 26, 2024
1 parent 45c554c commit 69369ad
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,25 @@ class CaptureFlowFragment(private val openWithDocument: Document? = null) :
override fun onFinishedWithResult(result: CaptureSDKResult) {
when (result) {
is CaptureSDKResult.Success -> {
if (GiniBank.getCaptureConfiguration()?.returnAssistantEnabled == true) {
try {
tryShowingReturnAssistant(result)
} catch (notUsed: DigitalInvoiceException) {
when {
GiniBank.getCaptureConfiguration()?.returnAssistantEnabled == true -> {
try {
tryShowingReturnAssistant(result)
return
} catch (notUsed: DigitalInvoiceException) {
tryShowingSkontoScreen(result)
return
}
}

GiniBank.getCaptureConfiguration()?.skontoEnabled == true -> {
tryShowingSkontoScreen(result)
return
}

else -> {
finishWithResult(result)
}
} else {
finishWithResult(result)
trackSdkClosedEvent(UserAnalyticsScreen.Analysis)
}
}

Expand Down

0 comments on commit 69369ad

Please sign in to comment.