Bugfix lowercase uppercase
parent
9deec816e0
commit
cce696afe9
|
@ -164,6 +164,9 @@ fun formPage(onCancelClick: () -> Unit) {
|
||||||
|
|
||||||
val wordsList = loadDatasFromFile().toMutableList()
|
val wordsList = loadDatasFromFile().toMutableList()
|
||||||
|
|
||||||
|
// Transform name to lowercase to avoid duplicates
|
||||||
|
name.value = name.value.lowercase()
|
||||||
|
|
||||||
// Verify if the word already exists in the glossary
|
// Verify if the word already exists in the glossary
|
||||||
if (wordsList.any { it.name.equals(name.value, ignoreCase = true) }) {
|
if (wordsList.any { it.name.equals(name.value, ignoreCase = true) }) {
|
||||||
println("Le mot '${name.value}' existe déjà dans le glossaire. Ajout annulé.")
|
println("Le mot '${name.value}' existe déjà dans le glossaire. Ajout annulé.")
|
||||||
|
|
Loading…
Reference in New Issue