Ver Fonte

Updated dependencies (fixing broken directory listing). Loading correct default settings now

Sebastian Stenzel há 8 anos atrás
pai
commit
51cb41975b

+ 3 - 1
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;

+ 4 - 1
main/commons/src/main/java/org/cryptomator/common/settings/SettingsJsonAdapter.java

@@ -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());

+ 6 - 2
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> 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) {

+ 2 - 1
main/pom.xml

@@ -28,7 +28,7 @@
 
 		<!-- dependency versions -->
 		<cryptomator.cryptolib.version>1.1.1</cryptomator.cryptolib.version>
-		<cryptomator.cryptofs.version>1.2.1</cryptomator.cryptofs.version>
+		<cryptomator.cryptofs.version>1.2.2</cryptomator.cryptofs.version>
 		<cryptomator.webdav.version>0.5.0</cryptomator.webdav.version>
 		<cryptomator.jni.version>1.0.0</cryptomator.jni.version>
 		<log4j.version>2.8.1</log4j.version> <!-- keep in sync with https://github.com/edwgiz/maven-shaded-log4j-transformer (used in uber-jar), or wait for https://issues.apache.org/jira/browse/LOG4J2-954 fix -->
@@ -239,6 +239,7 @@
 		<dependency>
 			<groupId>org.hamcrest</groupId>
 			<artifactId>hamcrest-all</artifactId>
+			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.mockito</groupId>