mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
remove attempt to find non-existing fallback dictionary
This commit is contained in:
parent
efb54c7573
commit
25b1c628e3
1 changed files with 4 additions and 11 deletions
|
@ -283,16 +283,9 @@ final public class BinaryDictionaryGetter {
|
||||||
|
|
||||||
if (!foundMainDict && dictPackSettings.isWordListActive(mainDictId)) {
|
if (!foundMainDict && dictPackSettings.isWordListActive(mainDictId)) {
|
||||||
final File dict = loadDictionaryFromAssets(locale.toString(), context, weakMatchAcceptable);
|
final File dict = loadDictionaryFromAssets(locale.toString(), context, weakMatchAcceptable);
|
||||||
final AssetFileAddress fallbackAsset;
|
if (dict != null) {
|
||||||
if (dict == null) {
|
final AssetFileAddress fallbackAsset = AssetFileAddress.makeFromFileName(dict.getPath());
|
||||||
// fall back to the old way (maybe remove? will not work if files are compressed)
|
if (fallbackAsset != null)
|
||||||
final int fallbackResId =
|
|
||||||
DictionaryInfoUtils.getMainDictionaryResourceId(context.getResources(), locale);
|
|
||||||
fallbackAsset = loadFallbackResource(context, fallbackResId);
|
|
||||||
} else {
|
|
||||||
fallbackAsset = AssetFileAddress.makeFromFileName(dict.getPath());
|
|
||||||
}
|
|
||||||
if (null != fallbackAsset) {
|
|
||||||
fileList.add(fallbackAsset);
|
fileList.add(fallbackAsset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue