From 795a3dde7c741ed94d2edffbc989eb01e0905fe2 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 17 Mar 2025 06:43:44 +0000 Subject: [PATCH] Remove platform pause from list box --- .../java/io/xpipe/app/comp/base/ListBoxViewComp.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java b/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java index 2467a1a03..721b62cc7 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java @@ -43,9 +43,6 @@ public class ListBoxViewComp extends Comp> { @Setter private boolean visibilityControl = false; - @Setter - private int platformPauseInterval = -1; - public ListBoxViewComp( ObservableList shown, ObservableList all, Function> compFunction, boolean scrollBar) { this.shown = shown; @@ -243,17 +240,10 @@ public class ListBoxViewComp extends Comp> { cache.keySet().removeIf(t -> !set.contains(t)); } - final long[] lastPause = {System.currentTimeMillis()}; // Create copy to reduce chances of concurrent modification var shownCopy = new ArrayList<>(shown); var newShown = shownCopy.stream() .map(v -> { - var elapsed = System.currentTimeMillis() - lastPause[0]; - if (platformPauseInterval != -1 && elapsed > platformPauseInterval) { - PlatformThread.runNestedLoopIteration(); - lastPause[0] = System.currentTimeMillis(); - } - if (!cache.containsKey(v)) { var comp = compFunction.apply(v); if (comp != null) {