Fix contact list not updating when adding a contact with no SIP address
This commit is contained in:
parent
5c9ab21356
commit
e9f868f60e
1 changed files with 2 additions and 1 deletions
|
|
@ -57,7 +57,8 @@ void MagicSearchList::setSelf(QSharedPointer<MagicSearchList> me) {
|
||||||
auto haveContact =
|
auto haveContact =
|
||||||
std::find_if(mList.begin(), mList.end(), [friendCore](const QSharedPointer<QObject> &item) {
|
std::find_if(mList.begin(), mList.end(), [friendCore](const QSharedPointer<QObject> &item) {
|
||||||
auto itemCore = item.objectCast<FriendCore>();
|
auto itemCore = item.objectCast<FriendCore>();
|
||||||
return itemCore->getDefaultAddress() == friendCore->getDefaultAddress() ||
|
return itemCore->getDefaultAddress().length() > 0 &&
|
||||||
|
itemCore->getDefaultAddress() == friendCore->getDefaultAddress() ||
|
||||||
itemCore->getFriendModel()->getFriend() == friendCore->getFriendModel()->getFriend();
|
itemCore->getFriendModel()->getFriend() == friendCore->getFriendModel()->getFriend();
|
||||||
});
|
});
|
||||||
if (haveContact == mList.end()) {
|
if (haveContact == mList.end()) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue