From bb03ed3ab4feb2b676e1e663683e11028bf79faa Mon Sep 17 00:00:00 2001 From: patschuh <46817726+patschuh@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:10:55 +0200 Subject: [PATCH] #46 some more non FX UI updates fixed --- build.gradle | 2 +- src/main/java/at/esque/kafka/Controller.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 6b89ac2..a78c3d3 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ plugins { } group = 'at.esque.kafka' -version = '2.9.3' +version = '2.9.4' repositories { mavenCentral() diff --git a/src/main/java/at/esque/kafka/Controller.java b/src/main/java/at/esque/kafka/Controller.java index 24ea0aa..06695a1 100644 --- a/src/main/java/at/esque/kafka/Controller.java +++ b/src/main/java/at/esque/kafka/Controller.java @@ -861,7 +861,7 @@ private void getOldestMessages(TopicMessageTypeConfig topic, Map }); } finally { consumerHandler.deregisterConsumer(consumerId); - backGroundTaskHolder.backgroundTaskStopped(); + Platform.runLater(() -> backGroundTaskHolder.backgroundTaskStopped()); } }); @@ -964,7 +964,7 @@ private void getNewestMessages(TopicMessageTypeConfig topic, Map }); } finally { consumerHandler.deregisterConsumer(consumerId); - backGroundTaskHolder.backgroundTaskStopped(); + Platform.runLater(() -> backGroundTaskHolder.backgroundTaskStopped()); } }); } @@ -1010,7 +1010,7 @@ private void getMessagesContinuously(TopicMessageTypeConfig topic, Map< }); } finally { consumerHandler.deregisterConsumer(consumerId); - backGroundTaskHolder.backgroundTaskStopped(); + Platform.runLater(() -> backGroundTaskHolder.backgroundTaskStopped()); } }); } @@ -1078,7 +1078,7 @@ private void trace(TopicMessageTypeConfig topic, Map co }); } finally { consumerHandler.deregisterConsumer(consumerId); - backGroundTaskHolder.backgroundTaskStopped(); + Platform.runLater(() -> backGroundTaskHolder.backgroundTaskStopped()); } }); } @@ -1185,7 +1185,7 @@ private void getMessagesFromSpecificOffset(TopicMessageTypeConfig topic, Map backGroundTaskHolder.backgroundTaskStopped()); } }); } @@ -1225,7 +1225,7 @@ private void getMessagesStartingFromInstant(TopicMessageTypeConfig topic, Map backGroundTaskHolder.backgroundTaskStopped()); } }); } @@ -1420,7 +1420,7 @@ public void applyTopicTemplatesClick(ActionEvent event) { } runInDaemonThread(() -> { try { - backGroundTaskHolder.setIsInProgress(true); + Platform.runLater(() -> backGroundTaskHolder.setIsInProgress(true)); List alreadyExistedTopics = new ArrayList<>(); List createdTopics = new ArrayList<>(); @@ -1443,7 +1443,7 @@ public void applyTopicTemplatesClick(ActionEvent event) { }); Platform.runLater(() -> TopicTemplateAppliedAlert.show(createdTopics, alreadyExistedTopics, topicListView.getScene().getWindow())); } finally { - backGroundTaskHolder.backgroundTaskStopped(); + Platform.runLater(() -> backGroundTaskHolder.backgroundTaskStopped()); } }); } @@ -1515,7 +1515,7 @@ public void playMessageBook(ActionEvent event) { stopWatch.stop(); topicToProducerMap.values().forEach(uuid -> producerHandler.deregisterProducer(uuid)); LOGGER.info("Message Book completed [{}]", stopWatch); - backGroundTaskHolder.backgroundTaskStopped(); + Platform.runLater(() -> backGroundTaskHolder.backgroundTaskStopped()); } }); }