From 7fa4b45aee931f9ec15e03a1e9cb64f2d9003f2a Mon Sep 17 00:00:00 2001 From: sspanak Date: Thu, 15 May 2025 16:56:23 +0300 Subject: [PATCH] new dev bug: DictionaryLoader status handler is incorrectly cleared between two languages instead of after all languages --- .../io/github/sspanak/tt9/db/words/DictionaryLoader.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/github/sspanak/tt9/db/words/DictionaryLoader.java b/app/src/main/java/io/github/sspanak/tt9/db/words/DictionaryLoader.java index e8bae0cf..6575c999 100644 --- a/app/src/main/java/io/github/sspanak/tt9/db/words/DictionaryLoader.java +++ b/app/src/main/java/io/github/sspanak/tt9/db/words/DictionaryLoader.java @@ -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)); }