diff --git a/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryListComp.java b/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryListComp.java index 45656312e..db1349e85 100644 --- a/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryListComp.java +++ b/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryListComp.java @@ -34,7 +34,9 @@ public class StoreEntryListComp extends SimpleComp { var initialCount = 1; var showIntro = Bindings.createBooleanBinding( () -> { - return initialCount == StoreViewState.get().getAllEntries().size(); + var all = StoreViewState.get().getAllConnectionsCategory(); + var connections = StoreViewState.get().getAllEntries().stream().filter(wrapper -> all.contains(wrapper.getEntry())).toList(); + return initialCount == connections.size(); }, StoreViewState.get().getAllEntries()); var map = new LinkedHashMap, ObservableValue>(); diff --git a/app/src/main/java/io/xpipe/app/comp/storage/store/StoreSectionMiniComp.java b/app/src/main/java/io/xpipe/app/comp/storage/store/StoreSectionMiniComp.java index 2b64b4152..a18cb3ad6 100644 --- a/app/src/main/java/io/xpipe/app/comp/storage/store/StoreSectionMiniComp.java +++ b/app/src/main/java/io/xpipe/app/comp/storage/store/StoreSectionMiniComp.java @@ -41,11 +41,6 @@ public class StoreSectionMiniComp extends Comp> { @Override public CompStructure createBase() { - var content = new ListBoxViewComp<>(section.getShownChildren(), section.getAllChildren(), (StoreSection e) -> { - return StoreSectionMiniComp.builder().section(e).augment(this.augment).build(); - }).withLimit(100) - .hgrow(); - var list = new ArrayList>(); BooleanProperty expanded; if (section.getWrapper() != null) { @@ -91,6 +86,19 @@ public class StoreSectionMiniComp extends Comp> { expanded = new SimpleBooleanProperty(true); } + // Optimization for large sections. If there are more than 20 children, only add the nodes to the scene if the + // section is actually expanded + var listSections = section.getWrapper() != null ? BindingsHelper.filteredContentBinding( + section.getShownChildren(), + storeSection -> section.getAllChildren().size() <= 20 + || expanded.get(), + expanded, + section.getAllChildren()) : section.getShownChildren(); + var content = new ListBoxViewComp<>(listSections, section.getAllChildren(), (StoreSection e) -> { + return StoreSectionMiniComp.builder().section(e).augment(this.augment).build(); + }).withLimit(100) + .hgrow(); + list.add(new HorizontalComp(List.of(content)) .styleClass("content") .apply(struc -> struc.get().setFillHeight(true)) diff --git a/app/src/main/java/io/xpipe/app/storage/DataStorage.java b/app/src/main/java/io/xpipe/app/storage/DataStorage.java index ae0a9b50f..1665a40ac 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStorage.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStorage.java @@ -560,6 +560,7 @@ public abstract class DataStorage { public void deleteStoreEntry(@NonNull DataStoreEntry store) { store.finalizeEntry(); this.storeEntries.remove(store); + getDisplayParent(store).ifPresent(p -> p.setChildrenCache(null)); this.listeners.forEach(l -> l.onStoreRemove(store)); refreshValidities(false); saveAsync(); diff --git a/core/src/main/java/io/xpipe/core/process/ProcessControl.java b/core/src/main/java/io/xpipe/core/process/ProcessControl.java index 88c6e3b4f..e866e7a42 100644 --- a/core/src/main/java/io/xpipe/core/process/ProcessControl.java +++ b/core/src/main/java/io/xpipe/core/process/ProcessControl.java @@ -4,7 +4,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.Charset; -import java.util.concurrent.ExecutorService; public interface ProcessControl extends AutoCloseable { @@ -17,10 +16,6 @@ public interface ProcessControl extends AutoCloseable { void resetData(); - ExecutorService getStdoutReader(); - - ExecutorService getStderrReader(); - String prepareTerminalOpen(String displayName) throws Exception; void closeStdin() throws IOException; diff --git a/dist/build.gradle b/dist/build.gradle index a48729b6c..e4f53eed0 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -36,6 +36,16 @@ task createChecksums(type: Checksum) { } } } + +clean { + doFirst { + // Fix clean failing when file is read-only + if (file("$distDir").exists()) { + file("$distDir").traverse { f -> if (f.exists() && f.isFile()) f.writable = true } + } + } +} + dist.finalizedBy(createChecksums) apply from: 'base.gradle'