From b0883f034be6871d6f676d1fe2303b26138f20d9 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 18 Jul 2023 11:49:25 +0200 Subject: [PATCH] change type and name of enable zbar config variable --- src/main/java/com/sparrowwallet/sparrow/io/Config.java | 10 +++------- src/main/java/net/sourceforge/zbar/ZBar.java | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Config.java b/src/main/java/com/sparrowwallet/sparrow/io/Config.java index d7aacce1..349502e8 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Config.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Config.java @@ -58,7 +58,7 @@ public class Config { private int enumerateHwPeriod = ENUMERATE_HW_PERIOD_SECS; private QRDensity qrDensity; private Boolean hdCapture; - private Boolean zbarScan; + private boolean useZbar = true; private String webcamDevice; private ServerType serverType; private Server publicElectrumServer; @@ -405,12 +405,8 @@ public void setHdCapture(Boolean hdCapture) { flush(); } - public Boolean isZbarScan() { - return zbarScan == null || zbarScan; - } - - public void setZbarScan(Boolean zbarScan) { - this.zbarScan = zbarScan; + public boolean isUseZbar() { + return useZbar; } public String getWebcamDevice() { diff --git a/src/main/java/net/sourceforge/zbar/ZBar.java b/src/main/java/net/sourceforge/zbar/ZBar.java index b3b84444..112b8580 100644 --- a/src/main/java/net/sourceforge/zbar/ZBar.java +++ b/src/main/java/net/sourceforge/zbar/ZBar.java @@ -15,7 +15,7 @@ public class ZBar { private final static boolean enabled; static { // static initializer - if(com.sparrowwallet.sparrow.io.Config.get().isZbarScan()) { + if(com.sparrowwallet.sparrow.io.Config.get().isUseZbar()) { enabled = loadLibrary(); } else { enabled = false;