cleanup up the code in FriendList, and fixed bug causing own locations not to show

This commit is contained in:
csoler 2019-08-20 14:57:44 +02:00
parent b26be4db08
commit 6a62227dba
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
4 changed files with 10 additions and 24 deletions

View file

@ -993,7 +993,9 @@ void RsFriendListModel::updateInternalData()
HierarchicalNodeInformation hnode ;
rsPeers->getPeerDetails(*it,hnode.node_info);
auto it2 = checkProfileIndex(hnode.node_info.gpg_id,pgp_indices,mProfiles,false);
// If the Peer ID belong to our own profile, we add our own profile to the list. Otherwise we do not display it in the friend list.
auto it2 = checkProfileIndex(hnode.node_info.gpg_id,pgp_indices,mProfiles,hnode.node_info.gpg_id == rsPeers->getGPGOwnId());
if(it2 == pgp_indices.end())
continue;