diff --git a/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.java b/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.java index c1a43b45dbd..25e52d294e4 100644 --- a/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.java +++ b/src/main/java/org/jabref/gui/ai/components/aichat/AiChatComponent.java @@ -21,6 +21,7 @@ import org.jabref.gui.ai.components.util.notifications.Notification; import org.jabref.gui.ai.components.util.notifications.NotificationsComponent; import org.jabref.gui.icon.IconTheme; +import org.jabref.gui.util.UiTaskExecutor; import org.jabref.logic.ai.AiPreferences; import org.jabref.logic.ai.AiService; import org.jabref.logic.ai.chatting.AiChatLogic; @@ -140,7 +141,7 @@ private void updateNotifications() { notificationsButton.setManaged(!notifications.isEmpty()); if (!notifications.isEmpty()) { - notificationsButton.setGraphic(IconTheme.JabRefIcons.WARNING.withColor(Color.YELLOW).getGraphicNode()); + UiTaskExecutor.runInJavaFXThread(() -> notificationsButton.setGraphic(IconTheme.JabRefIcons.WARNING.withColor(Color.YELLOW).getGraphicNode())); } }