mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-18 16:46:53 -04:00
code cleanup
This commit is contained in:
@@ -60,12 +60,11 @@ public class VolumePreferencesController implements FxController {
|
||||
this.mountToDriveLetterSupported = selectedMountService.map(s -> s.hasCapability(MountCapability.MOUNT_AS_DRIVE_LETTER));
|
||||
this.mountFlagsSupported = selectedMountService.map(s -> s.hasCapability(MountCapability.MOUNT_FLAGS));
|
||||
this.readonlySupported = selectedMountService.map(s -> s.hasCapability(MountCapability.READ_ONLY));
|
||||
this.fuseRestartRequired = selectedMountService.map(s -> {//
|
||||
return firstUsedProblematicFuseMountService.get() != null //
|
||||
this.fuseRestartRequired = selectedMountService.map(s -> //
|
||||
firstUsedProblematicFuseMountService.get() != null //
|
||||
&& VaultModule.isProblematicFuseService(s) //
|
||||
&& !firstUsedProblematicFuseMountService.get().equals(s);
|
||||
});
|
||||
|
||||
&& !firstUsedProblematicFuseMountService.get().equals(s)
|
||||
);
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
|
||||
@@ -84,7 +84,8 @@ public class MountOptionsController implements FxController {
|
||||
@VaultOptionsWindow Vault vault, //
|
||||
WindowsDriveLetters windowsDriveLetters, //
|
||||
ResourceBundle resourceBundle, //
|
||||
Lazy<Application> application, List<MountService> mountProviders, //
|
||||
Lazy<Application> application, //
|
||||
List<MountService> mountProviders, //
|
||||
@Named("FUPFMS") AtomicReference<MountService> firstUsedProblematicFuseMountService) {
|
||||
this.window = window;
|
||||
this.vaultSettings = vault.getVaultSettings();
|
||||
@@ -95,7 +96,11 @@ public class MountOptionsController implements FxController {
|
||||
this.mountProviders = mountProviders;
|
||||
var fallbackProvider = mountProviders.stream().findFirst().orElse(null);
|
||||
this.selectedMountService = ObservableUtil.mapWithDefault(vaultSettings.mountService, serviceName -> mountProviders.stream().filter(s -> s.getClass().getName().equals(serviceName)).findFirst().orElse(fallbackProvider), fallbackProvider);
|
||||
this.fuseRestartRequired = selectedMountService.map(s -> firstUsedProblematicFuseMountService.get() != null && VaultModule.isProblematicFuseService(s) && !firstUsedProblematicFuseMountService.get().equals(s));
|
||||
this.fuseRestartRequired = selectedMountService.map(s -> //
|
||||
firstUsedProblematicFuseMountService.get() != null //
|
||||
&& VaultModule.isProblematicFuseService(s) //
|
||||
&& !firstUsedProblematicFuseMountService.get().equals(s)
|
||||
);
|
||||
this.loopbackPortSupported = BooleanExpression.booleanExpression(selectedMountService.map(s -> s.hasCapability(MountCapability.LOOPBACK_PORT)));
|
||||
|
||||
this.defaultMountFlags = selectedMountService.map(s -> {
|
||||
|
||||
Reference in New Issue
Block a user