Fixed removing of a node in friends list.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7869 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-01-24 00:59:32 +00:00
parent 0039f0aa51
commit eff55b2591

View File

@ -1474,12 +1474,23 @@ void FriendList::removefriend()
if (rsPeers)
{
if(RsPgpId(getRsId(c)).isNull())
return ;
if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this Friend?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes)
{
rsPeers->removeFriend(RsPgpId(getRsId(c)));
switch (c->type()) {
case TYPE_GPG:
if(!RsPgpId(getRsId(c)).isNull()) {
if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this Friend?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes)
{
rsPeers->removeFriend(RsPgpId(getRsId(c)));
}
}
break;
case TYPE_SSL:
if (!RsPeerId(getRsId(c)).isNull()) {
if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this node?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes)
{
rsPeers->removeFriendLocation(RsPeerId(getRsId(c)));
}
}
break;
}
}
}