From 05a41a625c923d315afc754f7d2be70b3d09d8a6 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Sun, 21 Dec 2025 12:32:35 +0100 Subject: [PATCH] reset selection index everytime window is shown Signed-off-by: Armin Schrenk --- .../cryptomator/ui/notification/NotificationController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/notification/NotificationController.java b/src/main/java/org/cryptomator/ui/notification/NotificationController.java index ef2b95b37..6fe558ec5 100644 --- a/src/main/java/org/cryptomator/ui/notification/NotificationController.java +++ b/src/main/java/org/cryptomator/ui/notification/NotificationController.java @@ -75,14 +75,13 @@ public class NotificationController implements FxController { @FXML public void initialize() { + window.setOnShowing(_ -> selectionIndex.set(0)); selectionIndex.addListener((_, _, n) -> { if (!events.isEmpty()) { selectedEvent.setValue(events.get(n.intValue())); } }); selectedEvent.addListener(this::selectTexts); - - selectionIndex.setValue(0); } private void selectTexts(ObservableValue observable, VaultEvent oldEvent, VaultEvent newEvent) {