Skip to content

Commit

Permalink
Fix ai chat not on fx thread (#11796)
Browse files Browse the repository at this point in the history
* Fix ai chat not on fx thread

Fixes JabRef/jabref-issue-melting-pot#549

* fix import
  • Loading branch information
Siedlerchr committed Sep 19, 2024
1 parent c5e81a9 commit 4e864f6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()));
}
}

Expand Down

0 comments on commit 4e864f6

Please sign in to comment.