Android autofill search in notes text as fallback mechanism (#1013)

This commit is contained in:
Leendert de Borst
2025-07-22 14:00:06 +02:00
committed by Leendert de Borst
parent 68895a7834
commit b0d03d6bb1

View File

@@ -87,12 +87,18 @@ object CredentialMatcher {
}
}
// 4. Domain key match against service name
// 4. Domain key match against service name and notes
if (matches.isEmpty()) {
matches += credentials.filter { cred ->
cred.service.name?.lowercase()?.let { name ->
val matchesServiceName = cred.service.name?.lowercase()?.let { name ->
name.contains(domainKey) || domainKey.contains(name)
} == true
val matchesNotes = cred.notes?.lowercase()?.let { notes ->
notes.contains(domainKey) || domainKey.contains(notes)
} == true
matchesServiceName || matchesNotes
}
}