From c71a0aade6d0a77ae398bde65687e8d2d30bb027 Mon Sep 17 00:00:00 2001 From: crschnick Date: Sun, 24 Aug 2025 18:06:11 +0000 Subject: [PATCH] Add network scan restart button and fix thread issue --- app/src/main/java/io/xpipe/app/util/ScanDialogBase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/ScanDialogBase.java b/app/src/main/java/io/xpipe/app/util/ScanDialogBase.java index 0c5e1ead6..9aaf2abd6 100644 --- a/app/src/main/java/io/xpipe/app/util/ScanDialogBase.java +++ b/app/src/main/java/io/xpipe/app/util/ScanDialogBase.java @@ -12,6 +12,7 @@ import io.xpipe.app.storage.DataStoreEntryRef; import javafx.beans.binding.Bindings; import javafx.beans.property.*; +import javafx.beans.value.ObservableBooleanValue; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; @@ -101,7 +102,7 @@ public class ScanDialogBase { selected.clear(); } - private void onUpdate() { + public void onUpdate() { available.clear(); selected.clear(); @@ -160,7 +161,7 @@ public class ScanDialogBase { onUpdate(); }); - var show = busy.not().and(Bindings.isEmpty(available)); + var show = PlatformThread.sync(busy.not().and(Bindings.isEmpty(available))); button.visibleProperty().bind(show); button.managedProperty().bind(show);