Signed-off-by: Armin Schrenk <armin.schrenk@skymatic.de>
This commit is contained in:
Armin Schrenk
2025-12-05 11:23:52 +01:00
parent 8e9a001fde
commit f3415277d7
5 changed files with 9 additions and 12 deletions

View File

@@ -43,12 +43,10 @@ public class NotificationManager {
case BrokenFileNodeEvent bfne -> isRecent(bfne.ciphertextPath(), bfne);
default -> false;
};
if(notRecentlyAdded) {
synchronized (this) {
eventsRequiringNotification.add(e);
}
}
return notRecentlyAdded;
}
@@ -70,6 +68,4 @@ public class NotificationManager {
return result;
}
}
}

View File

@@ -89,7 +89,6 @@ public class FxApplication {
launchEventHandler.startHandlingLaunchEvents();
fxFSEventList.schedulePollForUpdates();
autoUnlocker.tryUnlockForTimespan(2, TimeUnit.MINUTES);
//TODO: init the NotificationListener
}
private void migrateAndInformDokanyRemoval() {

View File

@@ -218,5 +218,4 @@ public class FxApplicationWindows {
LOG.error("Failed to display stage", error);
}
}
}

View File

@@ -139,7 +139,9 @@ public class VaultListController implements FxController {
vaultList.setItems(vaults);
vaultList.setCellFactory(cellFactory);
vaultList.prefHeightProperty().bind(vaultList.fixedCellSizeProperty().multiply(Bindings.size(vaultList.getItems())));
vaultList.prefHeightProperty().bind( //
vaultList.fixedCellSizeProperty().multiply(Bindings.size(vaultList.getItems())) //
);
selectedVault.bind(vaultList.getSelectionModel().selectedItemProperty());
vaults.addListener((ListChangeListener.Change<? extends Vault> c) -> {
@@ -155,8 +157,12 @@ public class VaultListController implements FxController {
//unlock vault on double click
vaultList.addEventFilter(MouseEvent.MOUSE_CLICKED, click -> {
if (click.getClickCount() >= 2) {
Optional.ofNullable(selectedVault.get()).filter(Vault::isLocked).ifPresent(vault -> appWindows.startUnlockWorkflow(vault, mainWindow));
Optional.ofNullable(selectedVault.get()).filter(Vault::isUnlocked).ifPresent(vaultService::reveal);
Optional.ofNullable(selectedVault.get()) //
.filter(Vault::isLocked) //
.ifPresent(vault -> appWindows.startUnlockWorkflow(vault, mainWindow));
Optional.ofNullable(selectedVault.get()) //
.filter(Vault::isUnlocked) //
.ifPresent(vaultService::reveal);
}
});

View File

@@ -1,3 +0,0 @@
package org.cryptomator.ui.notification;
public record NotifyAction(String label, Runnable action) {}