fixed a crash when viewing the language list while a dictionary is loading
This commit is contained in:
parent
12a1626a5e
commit
008880a644
2 changed files with 5 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:tools="http://schemas.android.com/tools"
|
<manifest xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:versionCode="641"
|
android:versionCode="643"
|
||||||
android:versionName="37.0"
|
android:versionName="37.0"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import androidx.preference.PreferenceCategory;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
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.db.WordStoreAsync;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.LanguageCollection;
|
import io.github.sspanak.tt9.languages.LanguageCollection;
|
||||||
|
|
@ -47,7 +48,9 @@ public class LanguageSelectionScreen extends BaseScreenFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
addLanguagesToCategory(languagesCategory, allLanguages);
|
addLanguagesToCategory(languagesCategory, allLanguages);
|
||||||
WordStoreAsync.exists(this::addLoadedStatus, allLanguages);
|
if (!DictionaryLoader.getInstance(activity).isRunning()) {
|
||||||
|
WordStoreAsync.exists(this::addLoadedStatus, allLanguages);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue