1
0
Fork 0

db migrations

simplified the Add Word dialog

added a popup confirmation when there are new dictionary words
This commit is contained in:
sspanak 2024-02-19 14:29:13 +02:00 committed by Dimo Karaivanov
parent 0e8dfbe578
commit 4907671aa3
37 changed files with 497 additions and 313 deletions

View file

@ -5,9 +5,9 @@ ext.getDictionarySizes = { dictionariesDir, sizesDir ->
}
}
ext.getDictionaryTimestamps = { dictionariesDir, timestampsDir ->
ext.getDictionaryHashes = { dictionariesDir, timestampsDir ->
fileTree(dir: dictionariesDir).getFiles().parallelStream().forEach {dictionary ->
def dictionaryTimestamp = dictionary.exists() ? dictionary.lastModified() : 0
new File(timestampsDir, "${dictionary.getName()}.timestamp").text = dictionaryTimestamp
def hash = dictionary.exists() ? dictionary.text.digest("SHA-1") : ""
new File(timestampsDir, "${dictionary.getName()}.hash").text = hash
}
}