mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-23 09:46:36 +00:00
Fix status bar gc
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user