diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListStatusComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListStatusComp.java index 24181a25e..cf9e8f47b 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListStatusComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListStatusComp.java @@ -37,8 +37,15 @@ public class StoreEntryListStatusComp extends SimpleComp { public StoreEntryListStatusComp() { this.sortMode = new SimpleObjectProperty<>(); SimpleChangeListener.apply(StoreViewState.get().getActiveCategory(), val -> { - sortMode.unbind(); - sortMode.bindBidirectional(val.getSortMode()); + sortMode.setValue(val.getSortMode().getValue()); + }); + sortMode.addListener((observable, oldValue, newValue) -> { + var cat = StoreViewState.get().getActiveCategory().getValue(); + if (cat == null) { + return; + } + + cat.getSortMode().setValue(newValue); }); } diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java index 12cbbcf58..9952def1f 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java @@ -117,7 +117,7 @@ public class StoreSection { } var allChildren = BindingsHelper.filteredContentBinding(all, other -> { - // Legacy implementation that does not use caches. Use for testing + // Legacy implementation that does not use children caches. Use for testing // if (true) return DataStorage.get() // .getDisplayParent(other.getEntry()) // .map(found -> found.equals(e.getEntry())) 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 f3aa68325..303ca2d14 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStorage.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStorage.java @@ -285,6 +285,12 @@ public abstract class DataStorage { entry.initializeEntry(); if (!sameParent) { + if (oldParent.isPresent()) { + oldParent.get().setChildrenCache(null); + } + if (newParent.isPresent()) { + newParent.get().setChildrenCache(null); + } var toAdd = Stream.concat(Stream.of(entry), children.stream()).toArray(DataStoreEntry[]::new); listeners.forEach(storageListener -> storageListener.onStoreAdd(toAdd)); } diff --git a/app/src/main/java/io/xpipe/app/util/SecretManager.java b/app/src/main/java/io/xpipe/app/util/SecretManager.java index 248c066fd..9d22b6f8f 100644 --- a/app/src/main/java/io/xpipe/app/util/SecretManager.java +++ b/app/src/main/java/io/xpipe/app/util/SecretManager.java @@ -1,5 +1,6 @@ package io.xpipe.app.util; +import io.xpipe.app.issue.TrackEvent; import io.xpipe.core.process.CountDown; import io.xpipe.core.util.SecretReference; import io.xpipe.core.util.SecretValue; @@ -59,7 +60,9 @@ public class SecretManager { } public static void completeRequest(UUID request) { - progress.removeIf(secretQueryProgress -> secretQueryProgress.getRequestId().equals(request)); + if (progress.removeIf(secretQueryProgress -> secretQueryProgress.getRequestId().equals(request))) { + TrackEvent.withTrace("Completed secret request").tag("uuid", request).handle(); + } } public static void clearAll(Object store) { diff --git a/core/src/main/java/io/xpipe/core/process/CommandBuilder.java b/core/src/main/java/io/xpipe/core/process/CommandBuilder.java index ec5e680bd..d6ec186fc 100644 --- a/core/src/main/java/io/xpipe/core/process/CommandBuilder.java +++ b/core/src/main/java/io/xpipe/core/process/CommandBuilder.java @@ -25,7 +25,10 @@ public class CommandBuilder { private CommandBuilder() {} @Getter - private final CountDown countDown = CountDown.of(); + private CountDown countDown; + @Getter + private UUID uuid; + private final List elements = new ArrayList<>(); @Getter private final Map environmentVariables = new LinkedHashMap<>(); @@ -220,6 +223,9 @@ public class CommandBuilder { } public String buildCommandBase(ShellControl sc) throws Exception { + countDown = CountDown.of(); + uuid = UUID.randomUUID(); + for (FailableConsumer s : setup) { s.accept(sc); }