Skip to content

Commit

Permalink
* Fixes: NB#298338 - Reg:Incorrect contact name gets displayed in sli…
Browse files Browse the repository at this point in the history
…ding notification / notification area for a new skype message received
  • Loading branch information
Sascha Siebert authored and artonyk committed Feb 16, 2012
1 parent 433c90c commit 067858b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/notificationmanager.cpp
Expand Up @@ -1131,7 +1131,7 @@ void NotificationManager::slotResultsAvailable()
// there is no contact for the remote id

// show remote id in case of multiple contacts match
if (request->contacts().size() == 1) {
if (request->contacts().size() == 1 && request->contacts().first().localId() != m_pContactManager->selfContactId()) {
contact = request->contacts().first();
qDebug() << Q_FUNC_INFO << "Using" << contact.displayLabel();
}
Expand Down Expand Up @@ -1463,13 +1463,15 @@ void NotificationManager::slotResultsAvailableForUnknown()
bool matchedLocalId = false;

foreach (QContact contact, request->contacts()) {
QList<QContactOnlineAccount> accounts = contact.details<QContactOnlineAccount>();
QList<QContactPhoneNumber> phones = contact.details<QContactPhoneNumber>();

if (matchContact(accounts, phones, cuid.first, cuid.second))
matchedContacts << contact;
if (cacheContact.localId() == contact.localId())
matchedLocalId = true;
if (contact.localId() != m_pContactManager->selfContactId()) {
QList<QContactOnlineAccount> accounts = contact.details<QContactOnlineAccount>();
QList<QContactPhoneNumber> phones = contact.details<QContactPhoneNumber>();

if (matchContact(accounts, phones, cuid.first, cuid.second))
matchedContacts << contact;
if (cacheContact.localId() == contact.localId())
matchedLocalId = true;
} // if
}

if (matchedContacts.size() == 1)
Expand Down

0 comments on commit 067858b

Please sign in to comment.