mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
made GxsNotify for messages with more granularity. Removed RsGxsCircleMsg class that was not used.
This commit is contained in:
parent
efb26ce9c0
commit
ce6abe5d66
19 changed files with 217 additions and 284 deletions
|
@ -657,6 +657,7 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
|||
std::cout << "p3GxsTrans::notifyChanges(...)" << std::endl;
|
||||
#endif
|
||||
std::list<RsGxsGroupId> grps_to_request;
|
||||
GxsMsgReq msgs_to_request;
|
||||
|
||||
for( auto it = changes.begin(); it != changes.end(); ++it )
|
||||
{
|
||||
|
@ -675,11 +676,8 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
|||
#ifdef DEBUG_GXSTRANS
|
||||
std::cout << "p3GxsTrans::notifyChanges(...) msgChange" << std::endl;
|
||||
#endif
|
||||
uint32_t token;
|
||||
RsTokReqOptions opts; opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
RsGenExchange::getTokenService()->requestMsgInfo( token, 0xcaca,
|
||||
opts, msgChange->msgChangeMap );
|
||||
GxsTokenQueue::queueRequest(token, MAILS_UPDATE);
|
||||
|
||||
msgs_to_request[msgChange->mGroupId].insert(msgChange->mMsgId);
|
||||
|
||||
#ifdef DEBUG_GXSTRANS
|
||||
for( GxsMsgReq::const_iterator it = msgChange->msgChangeMap.begin();
|
||||
|
@ -701,6 +699,17 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
|||
delete *it;
|
||||
}
|
||||
|
||||
if(!msgs_to_request.empty())
|
||||
{
|
||||
uint32_t token;
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
RsGenExchange::getTokenService()->requestMsgInfo( token, 0xcaca, opts, msgs_to_request);
|
||||
|
||||
GxsTokenQueue::queueRequest(token, MAILS_UPDATE);
|
||||
}
|
||||
|
||||
|
||||
if(!grps_to_request.empty())
|
||||
requestGroupsData(&grps_to_request);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue