using new notification system for connection attempts

This commit is contained in:
csoler 2019-12-02 20:53:51 +01:00
parent d8569d813c
commit 65fa54c206
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
13 changed files with 127 additions and 131 deletions

View file

@ -479,20 +479,29 @@ void p3LinkMgrIMPL::tickMonitors()
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());
auto e = std::make_shared<RsConnectionEvent>() ;
notify->notifyPeerConnected(peer.id.toStdString());
e->mType = 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)
{
p3Notify *notify = RsServer::notify();
if (notify)
notify->notifyPeerDisconnected(peer.id.toStdString());
auto e = std::make_shared<RsConnectionEvent>() ;
e->mType = RsConnectionEvent::PEER_DISCONNECTED;
e->mSslId = peer.id;
rsEvents->postEvent(e);
}
}
}