mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-03 17:40:10 +00:00
set progress listener state in same thread
This commit is contained in:
parent
7f3fd0af08
commit
5466689857
1 changed files with 2 additions and 2 deletions
|
@ -11,11 +11,11 @@ public class DownloadListener {
|
||||||
private final DoubleProperty percentage = new SimpleDoubleProperty(-1);
|
private final DoubleProperty percentage = new SimpleDoubleProperty(-1);
|
||||||
|
|
||||||
public void progress(double percentage, long blocksLeft, Date date) {
|
public void progress(double percentage, long blocksLeft, Date date) {
|
||||||
UserThread.execute(() -> this.percentage.set(percentage / 100d));
|
UserThread.await(() -> this.percentage.set(percentage / 100d));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doneDownload() {
|
public void doneDownload() {
|
||||||
UserThread.execute(() -> this.percentage.set(1d));
|
UserThread.await(() -> this.percentage.set(1d));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyDoubleProperty percentageProperty() {
|
public ReadOnlyDoubleProperty percentageProperty() {
|
||||||
|
|
Loading…
Reference in a new issue