From 473f8e6b721c7c6d1b2a3de0fb6bc559e4968a8a Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Tue, 19 Sep 2023 20:45:34 +0200 Subject: [PATCH] Fix barcode not showing when returning and changing from none to some barcode --- .../java/protect/card_locker/LoyaltyCardViewActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/protect/card_locker/LoyaltyCardViewActivity.java b/app/src/main/java/protect/card_locker/LoyaltyCardViewActivity.java index f4fda0564..f0cae1f5e 100644 --- a/app/src/main/java/protect/card_locker/LoyaltyCardViewActivity.java +++ b/app/src/main/java/protect/card_locker/LoyaltyCardViewActivity.java @@ -98,7 +98,6 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements ImageView barcodeRenderTarget; int mainImageIndex = 0; List imageTypes; - boolean isBarcodeSupported = true; static final String STATE_IMAGEINDEX = "imageIndex"; static final String STATE_FULLSCREEN = "isFullscreen"; @@ -643,12 +642,15 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements fixBottomAppBarImageButtonColor(binding.bottomAppBarUpdateBalanceButton); setBottomAppBarButtonState(); + boolean isBarcodeSupported; if (format != null && !format.isSupported()) { isBarcodeSupported = false; Toast.makeText(this, getString(R.string.unsupportedBarcodeType), Toast.LENGTH_LONG).show(); } else if (format == null) { isBarcodeSupported = false; + } else { + isBarcodeSupported = true; } imageTypes = new ArrayList<>();