mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-06 16:17:31 +00:00
Updated dependencies (fixing broken directory listing). Loading correct default settings now
This commit is contained in:
@@ -10,6 +10,8 @@ package org.cryptomator.common.settings;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.IntegerProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
@@ -27,7 +29,7 @@ public class Settings {
|
||||
public static final int MAX_PORT = 65535;
|
||||
public static final boolean DEFAULT_CHECK_FOR_UDPATES = true;
|
||||
public static final int DEFAULT_PORT = 42427;
|
||||
public static final boolean DEFAULT_USE_IPV6 = false;
|
||||
public static final boolean DEFAULT_USE_IPV6 = SystemUtils.IS_OS_WINDOWS;
|
||||
public static final int DEFAULT_NUM_TRAY_NOTIFICATIONS = 3;
|
||||
public static final String DEFAULT_GVFS_SCHEME = "dav";
|
||||
public static final boolean DEFAULT_DEBUG_MODE = false;
|
||||
|
||||
@@ -69,7 +69,10 @@ public class SettingsJsonAdapter extends TypeAdapter<Settings> {
|
||||
settings.port().set(in.nextInt());
|
||||
break;
|
||||
case "useIpv6":
|
||||
settings.useIpv6().set(in.nextBoolean());
|
||||
// Temporarily we will disable loading this setting, as we want the default value on each app start.
|
||||
// This setting might be removed completely in the future
|
||||
// settings.useIpv6().set(in.nextBoolean());
|
||||
in.skipValue();
|
||||
break;
|
||||
case "numTrayNotifications":
|
||||
settings.numTrayNotifications().set(in.nextInt());
|
||||
|
||||
@@ -25,13 +25,16 @@ import javafx.beans.value.ObservableValue;
|
||||
|
||||
public class VaultSettings {
|
||||
|
||||
public static final boolean DEFAULT_MOUNT_AFTER_UNLOCK = true;
|
||||
public static final boolean DEFAULT_REAVEAL_AFTER_MOUNT = true;
|
||||
|
||||
private final Settings settings;
|
||||
private final String id;
|
||||
private final ObjectProperty<Path> path = new SimpleObjectProperty<>();
|
||||
private final StringProperty mountName = new SimpleStringProperty();
|
||||
private final StringProperty winDriveLetter = new SimpleStringProperty();
|
||||
private final BooleanProperty mountAfterUnlock = new SimpleBooleanProperty();
|
||||
private final BooleanProperty revealAfterMount = new SimpleBooleanProperty();
|
||||
private final BooleanProperty mountAfterUnlock = new SimpleBooleanProperty(DEFAULT_MOUNT_AFTER_UNLOCK);
|
||||
private final BooleanProperty revealAfterMount = new SimpleBooleanProperty(DEFAULT_REAVEAL_AFTER_MOUNT);
|
||||
|
||||
public VaultSettings(Settings settings, String id) {
|
||||
this.settings = settings;
|
||||
@@ -42,6 +45,7 @@ public class VaultSettings {
|
||||
mountName.addListener(this::somethingChanged);
|
||||
winDriveLetter.addListener(this::somethingChanged);
|
||||
mountAfterUnlock.addListener(this::somethingChanged);
|
||||
revealAfterMount.addListener(this::somethingChanged);
|
||||
}
|
||||
|
||||
private void somethingChanged(ObservableValue<?> observable, Object oldValue, Object newValue) {
|
||||
|
||||
Reference in New Issue
Block a user