mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-22 04:31: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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
prefHeight="200.0" prefWidth="300.0" maxHeight="300.0" maxWidth="400.0"
|
||||
styleClass="notification-window">
|
||||
<padding>
|
||||
<Insets top="18" right="24" bottom="22" left="24"/>
|
||||
<Insets top="12" right="12" bottom="12" left="12"/>
|
||||
</padding>
|
||||
<top>
|
||||
<HBox spacing="12" styleClass="dialog-header" alignment="CENTER_LEFT">
|
||||
@@ -34,7 +34,7 @@
|
||||
</top>
|
||||
|
||||
<center>
|
||||
<VBox spacing="10">
|
||||
<VBox spacing="12">
|
||||
<!--Label text="${controller.message}" styleClass="label-large" wrapText="true"/-->
|
||||
<Label text="${controller.description}" styleClass="label" wrapText="true"/>
|
||||
</VBox>
|
||||
|
||||
Reference in New Issue
Block a user