fix(android/engine): Disable suggestions if file doesn't exist

This commit is contained in:
Darcy Wong 2021-05-13 06:56:10 +07:00
parent 3d7029aa36
commit 755d3da0df

View file

@ -1053,8 +1053,10 @@ public final class KMManager {
File modelFile = new File(getLexicalModelsDir(), pkgID + File.separator + modelID + ".model.js");
String path = "file://" + modelFile.getAbsolutePath();
// Disable sugestions if lexical-model file doesn't exist
if (!modelFile.exists()) {
modelFileExists = false;
setBannerOptions(false);
KMLog.LogError(TAG, modelFile.getAbsolutePath() + " does not exist");
}