diff --git a/main/commons/src/main/java/org/cryptomator/common/settings/Settings.java b/main/commons/src/main/java/org/cryptomator/common/settings/Settings.java index 67fe4cb53..a43c8cf83 100644 --- a/main/commons/src/main/java/org/cryptomator/common/settings/Settings.java +++ b/main/commons/src/main/java/org/cryptomator/common/settings/Settings.java @@ -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; diff --git a/main/commons/src/main/java/org/cryptomator/common/settings/SettingsJsonAdapter.java b/main/commons/src/main/java/org/cryptomator/common/settings/SettingsJsonAdapter.java index ae3e301eb..1bb4ddbc8 100644 --- a/main/commons/src/main/java/org/cryptomator/common/settings/SettingsJsonAdapter.java +++ b/main/commons/src/main/java/org/cryptomator/common/settings/SettingsJsonAdapter.java @@ -69,7 +69,10 @@ public class SettingsJsonAdapter extends TypeAdapter { 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()); diff --git a/main/commons/src/main/java/org/cryptomator/common/settings/VaultSettings.java b/main/commons/src/main/java/org/cryptomator/common/settings/VaultSettings.java index 915a4e487..34e281aac 100644 --- a/main/commons/src/main/java/org/cryptomator/common/settings/VaultSettings.java +++ b/main/commons/src/main/java/org/cryptomator/common/settings/VaultSettings.java @@ -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 = 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) { diff --git a/main/pom.xml b/main/pom.xml index d8471d58e..d3caf9e90 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -28,7 +28,7 @@ 1.1.1 - 1.2.1 + 1.2.2 0.5.0 1.0.0 2.8.1 @@ -239,6 +239,7 @@ org.hamcrest hamcrest-all + test org.mockito