Skip to content

Commit

Permalink
Merge pull request #171 from getbouncer/awushensky/fix_display_bug
Browse files Browse the repository at this point in the history
Fix display bug
  • Loading branch information
awushensky authored Aug 12, 2020
2 parents eaf1c72 + aa7d7bd commit ebbcb97
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class CardScanActivity :
enableEnterCardManually: Boolean = false,
enableExpiryExtraction: Boolean = false,
enableNameExtraction: Boolean = false,
displayCardPan: Boolean = false,
displayCardPan: Boolean = true,
displayCardholderName: Boolean = false,
displayCardScanLogo: Boolean = true,
enableDebug: Boolean = Config.isDebug
Expand Down Expand Up @@ -257,7 +257,7 @@ class CardScanActivity :
enableEnterCardManually: Boolean = false,
enableExpiryExtraction: Boolean = false,
enableNameExtraction: Boolean = false,
displayCardPan: Boolean = false,
displayCardPan: Boolean = true,
displayCardholderName: Boolean = false,
displayCardScanLogo: Boolean = true,
enableDebug: Boolean = Config.isDebug
Expand Down Expand Up @@ -311,7 +311,7 @@ class CardScanActivity :
}

private val displayCardPan: Boolean by lazy {
intent.getBooleanExtra(PARAM_DISPLAY_CARD_PAN, false)
intent.getBooleanExtra(PARAM_DISPLAY_CARD_PAN, true)
}

private val displayCardholderName: Boolean by lazy {
Expand All @@ -323,11 +323,11 @@ class CardScanActivity :
}

private val enableNameExtraction: Boolean by lazy {
intent.getBooleanExtra(PARAM_ENABLE_NAME_EXTRACTION, true)
intent.getBooleanExtra(PARAM_ENABLE_NAME_EXTRACTION, false)
}

private val enableExpiryExtraction: Boolean by lazy {
intent.getBooleanExtra(PARAM_ENABLE_EXPIRY_EXTRACTION, true)
intent.getBooleanExtra(PARAM_ENABLE_EXPIRY_EXTRACTION, false)
}

private var mainLoopIsProducingResults = AtomicBoolean(false)
Expand Down Expand Up @@ -592,7 +592,7 @@ class CardScanActivity :
}

val willRunNameAndExpiry = (result.analyzerResult.isExpiryExtractionAvailable && enableExpiryExtraction) ||
(result.analyzerResult.isNameExtractionAvailable && result.analyzerResult.isNameExtractionAvailable)
(result.analyzerResult.isNameExtractionAvailable && enableNameExtraction)

when (result.state) {
is MainLoopState.Initial -> setStateNotFound()
Expand Down

0 comments on commit ebbcb97

Please sign in to comment.