proper handling of peer connections notifications

This commit is contained in:
csoler 2019-08-21 22:39:07 +02:00
parent 98e41ad075
commit 15e43dce01
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
10 changed files with 97 additions and 34 deletions

View file

@ -477,12 +477,24 @@ void p3LinkMgrIMPL::tickMonitors()
if (peer.actions & RS_PEER_CONNECTED)
{
p3Notify *notify = RsServer::notify();
if (notify)
{
// normally these two below should disappear: there's no notion of popup in libretroshare.
// all GUI-type display features should be chosen in NotifyQt.
notify->AddPopupMessage(RS_POPUP_CONNECT, peer.id.toStdString(),"", "Online: ");
notify->AddFeedItem(RS_FEED_ITEM_PEER_CONNECT, peer.id.toStdString());
notify->notifyPeerConnected(peer.id.toStdString());
}
}
if (peer.actions & RS_PEER_DISCONNECTED)
{
p3Notify *notify = RsServer::notify();
if (notify)
notify->notifyPeerDisconnected(peer.id.toStdString());
}
}
}