mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
Merge pull request #2228 from PhenomRetroShare/Fix_RsPostedPostsModelHandleEvent
Fix RsPostedPostsModel::handleEvent_main_thread
This commit is contained in:
commit
d6f02e28a7
1 changed files with 42 additions and 40 deletions
|
@ -81,8 +81,10 @@ void RsPostedPostsModel::handleEvent_main_thread(std::shared_ptr<const RsEvent>
|
|||
//
|
||||
// We need to update the data!
|
||||
|
||||
if(e->mPostedGroupId == mPostedGroup.mMeta.mGroupId)
|
||||
RsThread::async([this, e]()
|
||||
RsGxsPostedEvent E(*e);
|
||||
|
||||
if(E.mPostedGroupId == mPostedGroup.mMeta.mGroupId)
|
||||
RsThread::async([this, E]()
|
||||
{
|
||||
// 1 - get message data from p3GxsChannels
|
||||
|
||||
|
@ -90,9 +92,9 @@ void RsPostedPostsModel::handleEvent_main_thread(std::shared_ptr<const RsEvent>
|
|||
std::vector<RsGxsComment> comments;
|
||||
std::vector<RsGxsVote> votes;
|
||||
|
||||
if(!rsPosted->getBoardContent(mPostedGroup.mMeta.mGroupId,std::set<RsGxsMessageId>{ e->mPostedMsgId }, posts,comments,votes))
|
||||
if(!rsPosted->getBoardContent(mPostedGroup.mMeta.mGroupId,std::set<RsGxsMessageId>{ E.mPostedMsgId }, posts,comments,votes))
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << " failed to retrieve channel message data for channel/msg " << e->mPostedGroupId << "/" << e->mPostedMsgId << std::endl;
|
||||
RS_ERR(" failed to retrieve channel message data for channel/msg ", E.mPostedGroupId, "/", E.mPostedMsgId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -118,11 +120,11 @@ void RsPostedPostsModel::handleEvent_main_thread(std::shared_ptr<const RsEvent>
|
|||
},this);
|
||||
});
|
||||
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RsPostedPostsModel::initEmptyHierarchy()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue