mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
followup
This commit is contained in:
parent
80105aee62
commit
fa10714844
3 changed files with 13 additions and 2 deletions
|
|
@ -188,7 +188,8 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
|||
}
|
||||
});
|
||||
webcamDeviceProperty.addListener((_, _, newValue) -> {
|
||||
Config.get().setWebcamDevice(newValue.getUniqueId());
|
||||
Config.get().setWebcamDevice(newValue.getName());
|
||||
Config.get().setWebcamDeviceId(newValue.getUniqueId());
|
||||
if(!Objects.equals(webcamService.getDevice(), newValue)) {
|
||||
webcamService.cancel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class WebcamService extends ScheduledService<Image> {
|
|||
}
|
||||
} else if(Config.get().getWebcamDevice() != null) {
|
||||
for(CaptureDevice webcam : availableDevices) {
|
||||
if(webcam.getUniqueId().equals(Config.get().getWebcamDevice())) {
|
||||
if(webcam.getUniqueId().equals(Config.get().getWebcamDeviceId())) {
|
||||
selectedDevice = webcam;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class Config {
|
|||
private boolean mirrorCapture = true;
|
||||
private boolean useZbar = true;
|
||||
private String webcamDevice;
|
||||
private String webcamDeviceId;
|
||||
private ServerType serverType;
|
||||
private Server publicElectrumServer;
|
||||
private Server coreServer;
|
||||
|
|
@ -437,6 +438,15 @@ public class Config {
|
|||
flush();
|
||||
}
|
||||
|
||||
public String getWebcamDeviceId() {
|
||||
return webcamDeviceId;
|
||||
}
|
||||
|
||||
public void setWebcamDeviceId(String webcamDeviceId) {
|
||||
this.webcamDeviceId = webcamDeviceId;
|
||||
flush();
|
||||
}
|
||||
|
||||
public ServerType getServerType() {
|
||||
return serverType;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue