mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-14 08:41:28 +00:00
reset selection index everytime window is shown
Signed-off-by: Armin Schrenk <armin.schrenk@skymatic.de>
This commit is contained in:
@@ -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<? extends VaultEvent> observable, VaultEvent oldEvent, VaultEvent newEvent) {
|
||||
|
||||
Reference in New Issue
Block a user