mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
moved more peer connection notifications to rsEvents
This commit is contained in:
parent
9790b98605
commit
f118b4656e
5 changed files with 57 additions and 35 deletions
|
@ -473,30 +473,20 @@ void p3LinkMgrIMPL::tickMonitors()
|
|||
#endif
|
||||
|
||||
/* notify GUI */
|
||||
if (peer.actions & RS_PEER_CONNECTED)
|
||||
{
|
||||
p3Notify *notify = RsServer::notify();
|
||||
|
||||
if (notify)
|
||||
{
|
||||
auto e = std::make_shared<RsConnectionEvent>() ;
|
||||
|
||||
e->mConnectionType = RsConnectionEvent::PEER_CONNECTED;
|
||||
e->mSslId = peer.id;
|
||||
|
||||
rsEvents->postEvent(e);
|
||||
|
||||
// normally these this 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: ");
|
||||
}
|
||||
}
|
||||
if (peer.actions & RS_PEER_DISCONNECTED)
|
||||
if (rsEvents && (peer.actions & RS_PEER_CONNECTED))
|
||||
{
|
||||
auto e = std::make_shared<RsConnectionEvent>() ;
|
||||
|
||||
e->mConnectionType = RsConnectionEvent::PEER_DISCONNECTED;
|
||||
e->mConnectionInfoCode = RsConnectionEvent::PEER_CONNECTED;
|
||||
e->mSslId = peer.id;
|
||||
|
||||
rsEvents->postEvent(e);
|
||||
}
|
||||
if (rsEvents && (peer.actions & RS_PEER_DISCONNECTED))
|
||||
{
|
||||
auto e = std::make_shared<RsConnectionEvent>() ;
|
||||
|
||||
e->mConnectionInfoCode = RsConnectionEvent::PEER_DISCONNECTED;
|
||||
e->mSslId = peer.id;
|
||||
|
||||
rsEvents->postEvent(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue