Skip to content

Commit

Permalink
refactor(): Remove onFinishedWithCancellation() function from listene…
Browse files Browse the repository at this point in the history
…r interfaces

This is covered by the `CaptureSDKResult` and `CaptureResult` in `Cancel` state.
- remove onFinishedWithCancellation() from GiniCaptureFragmentListener
- remove onFinishedWithCancellation() from CaptureFlowFragmentListener

BSDK-258
  • Loading branch information
abolfazlimahdi committed Jan 19, 2024
1 parent e2fa698 commit 5221996
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ class ClientGiniCaptureFragment :
}


override fun onFinishedWithCancellation() {
requireActivity().finish()
}


}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ class CaptureFlowFragment(private val analysisIntent: Intent? = null) :
}
}

override fun onFinishedWithCancellation() {
captureFlowFragmentListener.onFinishedWithCancellation()
}

override fun onPayInvoice(
specificExtractions: Map<String, GiniCaptureSpecificExtraction>,
compoundExtractions: Map<String, GiniCaptureCompoundExtraction>
Expand Down Expand Up @@ -145,8 +141,6 @@ class CaptureFlowFragment(private val analysisIntent: Intent? = null) :
interface CaptureFlowFragmentListener {
fun onFinishedWithResult(result: CaptureResult)

fun onFinishedWithCancellation()

fun onCheckImportedDocument(
document: Document,
callback: CameraFragmentListener.DocumentCheckResultCallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class GiniCaptureFragment(private val analysisIntent: Intent? = null) :
}

override fun onDefaultPDFAppAlertDialogCancelled() {
giniCaptureFragmentListener.onFinishedWithCancellation()
giniCaptureFragmentListener.onFinishedWithResult(CaptureSDKResult.Cancel)
}

override fun onExtractionsAvailable(extractions: MutableMap<String, GiniCaptureSpecificExtraction>) {
Expand Down Expand Up @@ -286,8 +286,6 @@ class CaptureFragmentFactory(
interface GiniCaptureFragmentListener {
fun onFinishedWithResult(result: CaptureSDKResult)

fun onFinishedWithCancellation()

fun onCheckImportedDocument(
document: Document,
callback: CameraFragmentListener.DocumentCheckResultCallback
Expand Down

0 comments on commit 5221996

Please sign in to comment.