1
0
Fork 0

initial dictionary load is now immediately retried on failure instead of waiting 20 minutes

This commit is contained in:
sspanak 2025-04-16 12:26:00 +03:00 committed by Dimo Karaivanov
parent 617b3e618b
commit c7c2613db4

View file

@ -208,10 +208,12 @@ public class DictionaryLoader {
} catch (DictionaryImportAbortedException e) { } catch (DictionaryImportAbortedException e) {
sqlite.failTransaction(); sqlite.failTransaction();
stop(); stop();
self.lastAutoLoadAttemptTime.put(language.getId(), null);
Logger.i(LOG_TAG, e.getMessage() + ". File '" + language.getDictionaryFile() + "' not imported."); Logger.i(LOG_TAG, e.getMessage() + ". File '" + language.getDictionaryFile() + "' not imported.");
} catch (DictionaryImportException e) { } catch (DictionaryImportException e) {
stop(); stop();
sqlite.failTransaction(); sqlite.failTransaction();
self.lastAutoLoadAttemptTime.put(language.getId(), null);
sendImportError(DictionaryImportException.class.getSimpleName(), language.getId(), e.line); sendImportError(DictionaryImportException.class.getSimpleName(), language.getId(), e.line);
Logger.e( Logger.e(
@ -223,6 +225,7 @@ public class DictionaryLoader {
} catch (Exception | Error e) { } catch (Exception | Error e) {
stop(); stop();
sqlite.failTransaction(); sqlite.failTransaction();
self.lastAutoLoadAttemptTime.put(language.getId(), null);
sendError(e.getClass().getSimpleName(), language.getId()); sendError(e.getClass().getSimpleName(), language.getId());
Logger.e( Logger.e(