mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-21 20:21:27 +00:00
@@ -67,36 +67,41 @@ public class NotificationController implements FxController {
|
||||
|
||||
@FXML
|
||||
public void handleButtonAction() {
|
||||
var ev = selectedEvent.get();
|
||||
switch (ev) {
|
||||
default -> {
|
||||
} //normally nothing
|
||||
}
|
||||
//executorService.submit(callback.action());
|
||||
int i = selectionIndex.get();
|
||||
notificationsProp.remove(i); //remove processed event
|
||||
|
||||
if (notificationsProp.isEmpty()) {
|
||||
close(); //no more events
|
||||
} else if (notificationsProp.size() == i) {
|
||||
i = i - 1;
|
||||
selectionIndex.set(i); //triggers event update
|
||||
} else {
|
||||
selectedEvent.set(notificationsProp.get(i));
|
||||
try {
|
||||
var ev = selectedEvent.get();
|
||||
switch (ev) {
|
||||
//TODO: executorService.submit(callback.action());
|
||||
default -> {
|
||||
} //normally nothing
|
||||
}
|
||||
} finally {
|
||||
//remove processed event
|
||||
int i = selectionIndex.get();
|
||||
notificationsProp.remove(i);
|
||||
if (notificationsProp.isEmpty()) {
|
||||
close(); //no more events
|
||||
} else if (notificationsProp.size() == i) {
|
||||
i = i - 1;
|
||||
selectionIndex.set(i); //triggers event update
|
||||
} else {
|
||||
selectedEvent.set(notificationsProp.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@FXML void previousNotification() {
|
||||
@FXML
|
||||
public void previousNotification() {
|
||||
int i = selectionIndex.get();
|
||||
if( i != 0) {
|
||||
selectionIndex.set(i-1);
|
||||
if (i != 0) {
|
||||
selectionIndex.set(i - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@FXML void nextNotification() {
|
||||
@FXML
|
||||
public void nextNotification() {
|
||||
int i = selectionIndex.get();
|
||||
if(i != notificationsProp.size() - 1){
|
||||
selectionIndex.set(i+1);
|
||||
if (i != notificationsProp.size() - 1) {
|
||||
selectionIndex.set(i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user