1
0
Fork 0

new dev bug: DictionaryLoader status handler is incorrectly cleared between two languages instead of after all languages

This commit is contained in:
sspanak 2025-05-15 16:56:23 +03:00 committed by Dimo Karaivanov
parent 43e768bfeb
commit 7fa4b45aee

View file

@ -104,6 +104,8 @@ public class DictionaryLoader {
currentFile++;
}
onStatusChange = null;
Timer.stop(IMPORT_TIMER);
}
@ -350,12 +352,7 @@ public class DictionaryLoader {
progressMsg.putLong("time", Timer.get(IMPORT_TIMER));
progressMsg.putInt("progress", Math.round(progress));
progressMsg.putInt("currentFile", currentFile);
asyncHandler.post(() -> {
onStatusChange.accept(progressMsg);
if (progress >= 100) {
onStatusChange = null;
}
});
asyncHandler.post(() -> onStatusChange.accept(progressMsg));
}