Browse Source

Reinitiate force lock

Armin Schrenk 2 năm trước cách đây
mục cha
commit
d93ef2e905

+ 5 - 4
src/main/java/org/cryptomator/common/vaults/Vault.java

@@ -409,13 +409,14 @@ public class Vault {
 	}
 
 
-	/* TODO: reactivate/ needed at all?
 	public boolean supportsForcedUnmount() {
-		return volume.supportsForcedUnmount();
+		var mh = mountHandle.get();
+		if(mh == null) {
+			throw new IllegalStateException("Vault is not mounted");
+		};
+		return mountHandle.get().supportsUnmountForced();
 	}
 
-	 */
-
 	private record MountHandle(Mount mount, boolean supportsUnmountForced) {
 
 	}

+ 1 - 1
src/main/java/org/cryptomator/ui/lock/LockForcedController.java

@@ -53,7 +53,7 @@ public class LockForcedController implements FxController {
 	}
 
 	public boolean isForceSupported() {
-		return false;//vault.supportsForcedUnmount(); TODO
+		return vault.supportsForcedUnmount();
 	}
 
 }