|
12 | 12 | import java.util.function.Consumer; |
13 | 13 |
|
14 | 14 | import javafx.application.Platform; |
| 15 | +import javafx.collections.ObservableList; |
15 | 16 | import javafx.concurrent.Task; |
16 | 17 | import javafx.print.PrinterJob; |
17 | 18 | import javafx.scene.Group; |
@@ -83,12 +84,15 @@ public class JabRefDialogService implements DialogService { |
83 | 84 | private final NotificationGroup<Object, Notifications.UiNotification> uiNotifications = new NotificationGroup<>(Localization.lang("Preview")); |
84 | 85 | private final NotificationGroup<Task<?>, Notifications.TaskNotification> taskNotifications = new NotificationGroup<>(Localization.lang("Tasks")); |
85 | 86 |
|
| 87 | + private final ObservableList<Notification<?>> persistentNotifications; |
| 88 | + |
86 | 89 | private final Window mainWindow; |
87 | 90 |
|
88 | 91 | public JabRefDialogService(Window mainWindow) { |
89 | 92 | this.mainWindow = mainWindow; |
90 | 93 |
|
91 | 94 | taskNotifications.setViewFactory(Notifications.TaskNotificationView::new); |
| 95 | + persistentNotifications = EasyBind.concat(fileNotifications.getNotifications()); |
92 | 96 | } |
93 | 97 |
|
94 | 98 | private FXDialog createDialog(AlertType type, String title, String content) { |
@@ -561,4 +565,8 @@ private String getContentByCode(int statusCode) { |
561 | 565 | public List<NotificationGroup<?, ? extends Notification<?>>> getNotificationGroups() { |
562 | 566 | return List.of(undefinedNotifications, fileNotifications, uiNotifications, taskNotifications); |
563 | 567 | } |
| 568 | + |
| 569 | + public ObservableList<? extends Notification<?>> getPersistentNotifications() { |
| 570 | + return persistentNotifications; |
| 571 | + } |
564 | 572 | } |
0 commit comments