Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[libcontacts] Filter out false positive matches even if there is only…
… one query result. Contributes to JB#38835
  • Loading branch information
Timur Kristóf committed Jan 29, 2020
1 parent cdf4012 commit 1283203
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/seasidecache.cpp
Expand Up @@ -2886,7 +2886,8 @@ void SeasideCache::addressRequestStateChanged(QContactAbstractRequest::State sta
const QList<QContact> &resolvedContacts = it.key()->contacts();

if (!resolvedContacts.isEmpty()) {
if (resolvedContacts.count() == 1) {
if (resolvedContacts.count() == 1 && data.first != QString()) {
// Return the result because it is the only resolved contact; however still filter out false positive phone number matches
item = itemById(apiId(resolvedContacts.first()), false);
} else {
// Lookup the result in our updated indexes
Expand Down

0 comments on commit 1283203

Please sign in to comment.