mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
Merge pull request #2228 from PhenomRetroShare/Fix_RsPostedPostsModelHandleEvent
Fix RsPostedPostsModel::handleEvent_main_thread
This commit is contained in:
commit
d6f02e28a7
@ -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,10 +120,10 @@ void RsPostedPostsModel::handleEvent_main_thread(std::shared_ptr<const RsEvent>
|
||||
},this);
|
||||
});
|
||||
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RsPostedPostsModel::initEmptyHierarchy()
|
||||
|
Loading…
Reference in New Issue
Block a user