diff --git a/retroshare-gui/src/gui/common/FriendListModel.cpp b/retroshare-gui/src/gui/common/FriendListModel.cpp index 4c37b0927..de7ed2ab3 100644 --- a/retroshare-gui/src/gui/common/FriendListModel.cpp +++ b/retroshare-gui/src/gui/common/FriendListModel.cpp @@ -973,9 +973,16 @@ RsFriendListModel::EntryType RsFriendListModel::getType(const QModelIndex& i) co return e.type; } -std::map::const_iterator RsFriendListModel::createInvalidatedProfile(const RsPgpFingerprint& fpr,std::map& pgp_indices,std::vector& mProfiles) +std::map::const_iterator RsFriendListModel::createInvalidatedProfile(const RsPgpId& _pgp_id,const RsPgpFingerprint& fpr,std::map& pgp_indices,std::vector& mProfiles) { - RsPgpId pgp_id = rsPeers->pgpIdFromFingerprint(fpr); + // This is necessary by the time the full fingerprint is used in PeerNetItem. + + RsPgpId pgp_id; + + if(!fpr.isNull()) + pgp_id = rsPeers->pgpIdFromFingerprint(fpr); + else + pgp_id = _pgp_id; auto it2 = pgp_indices.find(pgp_id); @@ -1087,7 +1094,7 @@ void RsFriendListModel::updateInternalData() { // This peer's pgp key hasn't been validated yet. We list such peers at the end. - it2 = createInvalidatedProfile(hnode.node_info.fpr,pgp_indices,mProfiles); + it2 = createInvalidatedProfile(hnode.node_info.gpg_id,hnode.node_info.fpr,pgp_indices,mProfiles); } mProfiles[it2->second].child_node_indices.push_back(mLocations.size()); diff --git a/retroshare-gui/src/gui/common/FriendListModel.h b/retroshare-gui/src/gui/common/FriendListModel.h index c3df062cd..5e8d84930 100644 --- a/retroshare-gui/src/gui/common/FriendListModel.h +++ b/retroshare-gui/src/gui/common/FriendListModel.h @@ -164,9 +164,10 @@ private: std::vector& mProfiles, bool create); - std::map::const_iterator createInvalidatedProfile(const RsPgpFingerprint& pgp_id, - std::map& pgp_indices, - std::vector& mProfiles); + std::map::const_iterator createInvalidatedProfile(const RsPgpId& pgp_id, + const RsPgpFingerprint& fpr, + std::map& pgp_indices, + std::vector& mProfiles); QVariant sizeHintRole (const EntryIndex& e, int col) const; QVariant displayRole (const EntryIndex& e, int col) const;