From 4df4a7572fbbf7327c5b99dea176051403cdacb0 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 4 Mar 2024 15:22:57 +0000 Subject: [PATCH] Fix status bar gc --- .../main/java/io/xpipe/app/browser/BrowserStatusBarComp.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java index 4b4ab0d81..3734c7de8 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java @@ -7,6 +7,7 @@ import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.SimpleCompStructure; import io.xpipe.app.fxcomps.augment.ContextMenuAugment; import io.xpipe.app.fxcomps.impl.LabelComp; +import io.xpipe.app.fxcomps.util.BindingsHelper; import io.xpipe.app.fxcomps.util.PlatformThread; import io.xpipe.app.util.HumanReadableFormat; import javafx.beans.binding.Bindings; @@ -55,7 +56,7 @@ public class BrowserStatusBarComp extends SimpleComp { model.getProgress().getValue().getTotal(), true); }, model.getProgress())); - var progressComp = new LabelComp(Bindings.createStringBinding( + var progressComp = new LabelComp(BindingsHelper.persist(Bindings.createStringBinding( () -> { if (model.getProgress().getValue() == null || model.getProgress().getValue().done()) { @@ -69,7 +70,7 @@ public class BrowserStatusBarComp extends SimpleComp { }, transferredCount, allCount, - model.getProgress())); + model.getProgress()))); return progressComp; }