Harmonization of field names #789

This commit is contained in:
J-Jamet
2020-11-18 20:23:05 +01:00
parent c13cf1a86c
commit 6983f9f0b6
4 changed files with 8 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
KeePassDX(2.9.2) KeePassDX(2.9.2)
* Prevent manual creation of existing field name #718 * Prevent manual creation of existing field name #718
* Harmonization of field names #789
* Fix search in OTP #780 * Fix search in OTP #780
* Fix empty OTP field after selection #781 * Fix empty OTP field after selection #781
* Fix same save shared info #783 * Fix same save shared info #783

View File

@@ -107,7 +107,7 @@ class EntryInfo : Parcelable {
private fun addUniqueField(field: Field, number: Int = 0) { private fun addUniqueField(field: Field, number: Int = 0) {
var sameName = false var sameName = false
var sameValue = false var sameValue = false
val suffix = if (number > 0) number.toString() else "" val suffix = if (number > 0) "_$number" else ""
customFields.forEach { currentField -> customFields.forEach { currentField ->
// Not write the same data again // Not write the same data again
if (currentField.protectedValue.stringValue == field.protectedValue.stringValue) { if (currentField.protectedValue.stringValue == field.protectedValue.stringValue) {
@@ -152,7 +152,8 @@ class EntryInfo : Parcelable {
else if (url != webDomainToStore){ else if (url != webDomainToStore){
// Save web domain in custom field // Save web domain in custom field
addUniqueField(Field(WEB_DOMAIN_FIELD_NAME, addUniqueField(Field(WEB_DOMAIN_FIELD_NAME,
ProtectedString(false, webDomainToStore)) ProtectedString(false, webDomainToStore)),
1 // Start to one because URL is a standard field name
) )
} }
} ?: run { } ?: run {
@@ -169,8 +170,8 @@ class EntryInfo : Parcelable {
companion object { companion object {
const val WEB_DOMAIN_FIELD_NAME = "WebDomain" const val WEB_DOMAIN_FIELD_NAME = "URL"
const val APPLICATION_ID_FIELD_NAME = "ApplicationId" const val APPLICATION_ID_FIELD_NAME = "AndroidApp"
@JvmField @JvmField
val CREATOR: Parcelable.Creator<EntryInfo> = object : Parcelable.Creator<EntryInfo> { val CREATOR: Parcelable.Creator<EntryInfo> = object : Parcelable.Creator<EntryInfo> {

View File

@@ -1,4 +1,5 @@
* Prevent manual creation of existing field name #718 * Prevent manual creation of existing field name #718
* Harmonization of field names #789
* Fix search in OTP #780 * Fix search in OTP #780
* Fix empty OTP field after selection #781 * Fix empty OTP field after selection #781
* Fix same save shared info #783 * Fix same save shared info #783

View File

@@ -1,4 +1,5 @@
* Préviens la création manuelle d'un nom de champ existant #718 * Préviens la création manuelle d'un nom de champ existant #718
* Harmonisation des noms de champ #789
* Correction de la recherche de l'OTP #780 * Correction de la recherche de l'OTP #780
* Correction de champ OTP vide après sélection #781 * Correction de champ OTP vide après sélection #781
* Correction de la sauvegarde d'une même info partagée #783 * Correction de la sauvegarde d'une même info partagée #783