Skip to content

Commit

Permalink
change type and name of enable zbar config variable
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Jul 18, 2023
1 parent f88628c commit b0883f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions src/main/java/com/sparrowwallet/sparrow/io/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sourceforge/zbar/ZBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b0883f0

Please sign in to comment.