Synchronize download progress

This commit is contained in:
crschnick 2024-07-31 13:58:03 +00:00
parent 8f65b1d43d
commit 851911582b

View file

@ -190,12 +190,11 @@ public class BrowserTransferModel {
}
public ObservableBooleanValue downloadFinished() {
return Bindings.createBooleanBinding(
() -> {
return progress.getValue() != null
&& progress.getValue().done();
},
progress);
synchronized (progress) {
return Bindings.createBooleanBinding(() -> {
return progress.getValue() != null && progress.getValue().done();
}, progress);
}
}
}
}