From ec2c3253a00d42f27d68a3c0591413694a5f4f10 Mon Sep 17 00:00:00 2001 From: Helium314 Date: Mon, 26 Jun 2023 14:17:53 +0200 Subject: [PATCH] allow using all dictionary file versions removes a hack preventing version < 18, which is really bad for user-added dictionaries --- .../openboard/inputmethod/latin/BinaryDictionaryGetter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/BinaryDictionaryGetter.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/BinaryDictionaryGetter.java index 164c95786..9ea838108 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/BinaryDictionaryGetter.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/BinaryDictionaryGetter.java @@ -253,7 +253,10 @@ final public class BinaryDictionaryGetter { // cachedWordLists may not be null, see doc for getCachedDictionaryList for (final File f : cachedWordLists) { final String wordListId = DictionaryInfoUtils.getWordListIdFromFileName(f.getName()); - final boolean canUse = f.canRead() && hackCanUseDictionaryFile(f); + // remove the hack that requires version 18 + // danger of getting an old version is rather low, and user-added dictionaries + // will usually not work as they will likely start at version 1 + final boolean canUse = f.canRead(); // && hackCanUseDictionaryFile(f); if (canUse && DictionaryInfoUtils.isMainWordListId(wordListId)) { foundMainDict = true; }