This commit is contained in:
Dmitry Isaenko 2019-02-18 03:06:49 +03:00
parent c4d0959cf3
commit f5a9ddf8df
13 changed files with 162 additions and 91 deletions

View file

@ -49,19 +49,18 @@ public class MessagesConsumer extends AnimationTimer {
if (progressRecieved > 0)
progress.forEach(prg -> progressBar.setProgress(prg));
if (isInterrupted) {
if (isInterrupted) { // It's safe 'cuz it's could't be interrupted while HashMap populating
MediatorControl.getInstance().setTransferActive(false);
progressBar.setProgress(0.0);
if (statusMap.size() > 0) // It's safe 'cuz it's could't be interrupted while HashMap populating
if (statusMap.size() > 0)
for (String key : statusMap.keySet())
tableViewController.setFileStatus(key, statusMap.get(key));
this.stop();
}
//TODO
}
void interrupt(){
this.isInterrupted = true;
}
}
}