1
0
Fork 0

fixed a crash when viewing the language list while a dictionary is loading

This commit is contained in:
sspanak 2024-08-20 16:39:02 +03:00 committed by Dimo Karaivanov
parent 12a1626a5e
commit 008880a644
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:tools="http://schemas.android.com/tools"
android:versionCode="641"
android:versionCode="643"
android:versionName="37.0"
xmlns:android="http://schemas.android.com/apk/res/android">

View file

@ -6,6 +6,7 @@ import androidx.preference.PreferenceCategory;
import java.util.ArrayList;
import io.github.sspanak.tt9.R;
import io.github.sspanak.tt9.db.DictionaryLoader;
import io.github.sspanak.tt9.db.WordStoreAsync;
import io.github.sspanak.tt9.languages.Language;
import io.github.sspanak.tt9.languages.LanguageCollection;
@ -47,7 +48,9 @@ public class LanguageSelectionScreen extends BaseScreenFragment {
}
addLanguagesToCategory(languagesCategory, allLanguages);
WordStoreAsync.exists(this::addLoadedStatus, allLanguages);
if (!DictionaryLoader.getInstance(activity).isRunning()) {
WordStoreAsync.exists(this::addLoadedStatus, allLanguages);
}
}