remove attempt to find non-existing fallback dictionary

This commit is contained in:
Helium314 2023-09-07 08:17:19 +02:00
parent efb54c7573
commit 25b1c628e3

View file

@ -283,17 +283,10 @@ 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 = fileList.add(fallbackAsset);
DictionaryInfoUtils.getMainDictionaryResourceId(context.getResources(), locale);
fallbackAsset = loadFallbackResource(context, fallbackResId);
} else {
fallbackAsset = AssetFileAddress.makeFromFileName(dict.getPath());
}
if (null != fallbackAsset) {
fileList.add(fallbackAsset);
} }
} }