diff --git a/app/src/main/java/com/kunzisoft/keepass/model/EntryInfo.kt b/app/src/main/java/com/kunzisoft/keepass/model/EntryInfo.kt index dd82778b9..283a65bb6 100644 --- a/app/src/main/java/com/kunzisoft/keepass/model/EntryInfo.kt +++ b/app/src/main/java/com/kunzisoft/keepass/model/EntryInfo.kt @@ -129,6 +129,11 @@ class EntryInfo : Parcelable { searchInfo.otpString?.let { otpString -> // Replace the OTP field OtpEntryFields.parseOTPUri(otpString)?.let { otpElement -> + if (title.isEmpty()) + title = otpElement.issuer + if (username.isEmpty()) + username = otpElement.name + // Add OTP field val mutableCustomFields = customFields as ArrayList val otpField = OtpEntryFields.buildOtpField(otpElement, null, null) if (mutableCustomFields.contains(otpField)) { diff --git a/app/src/main/java/com/kunzisoft/keepass/model/SearchInfo.kt b/app/src/main/java/com/kunzisoft/keepass/model/SearchInfo.kt index 72ce250c4..ac1f37b3a 100644 --- a/app/src/main/java/com/kunzisoft/keepass/model/SearchInfo.kt +++ b/app/src/main/java/com/kunzisoft/keepass/model/SearchInfo.kt @@ -73,7 +73,7 @@ class SearchInfo : ObjectNameResource, Parcelable { override fun getName(resources: Resources): String { otpString?.let { otpString -> OtpEntryFields.parseOTPUri(otpString)?.let { otpElement -> - return "${otpElement.type} (${Uri.decode(otpElement.issuer)} : ${Uri.decode(otpElement.name)})" + return "${otpElement.type} (${Uri.decode(otpElement.issuer)}:${Uri.decode(otpElement.name)})" } } return toString()