mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
removing of own gpg key as friend when not necessary
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2080 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
98820697d4
commit
b617dcd1f7
3 changed files with 17 additions and 3 deletions
|
@ -334,8 +334,16 @@ void PeersDialog::insertPeers()
|
|||
//remove items that are not fiends anymore
|
||||
int index = 0;
|
||||
while (index < peertreeWidget->topLevelItemCount()) {
|
||||
std::string gpg_id = (peertreeWidget->topLevelItem(index))->text(3).toStdString();
|
||||
if (!rsPeers->isGPGAccepted(gpg_id) && gpg_id != rsPeers->getGPGOwnId()) {
|
||||
std::string gpg_widget_id = (peertreeWidget->topLevelItem(index))->text(3).toStdString();
|
||||
std::list<std::string>::iterator gpgfriendIt;
|
||||
bool found = false;
|
||||
for (gpgfriendIt = gpgFriends.begin(); gpgfriendIt != gpgFriends.end(); gpgfriendIt++) {
|
||||
if (gpg_widget_id == *gpgfriendIt) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
peertreeWidget->takeTopLevelItem(index);
|
||||
} else {
|
||||
index++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue