mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -04:00
fix(progresskeeper): dont remove task count listener until it reaches 0 (#5650)
If waitUltilDone() is called when you have 2 or more other tasks, the first one that is changed will still have tasks to wait for, but when it finishes it won't run because it was removed early. (translated)
This commit is contained in:
parent
74492eaa7e
commit
df0b762cf3
@ -90,9 +90,9 @@ public class ProgressKeeper {
|
|||||||
public void onUpdateTaskCount(int taskCount) {
|
public void onUpdateTaskCount(int taskCount) {
|
||||||
if(taskCount == 0) {
|
if(taskCount == 0) {
|
||||||
runnable.run();
|
runnable.run();
|
||||||
}
|
|
||||||
removeTaskCountListener(this);
|
removeTaskCountListener(this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
addTaskCountListener(listener);
|
addTaskCountListener(listener);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user