mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-18 05:50:39 -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!
|
// We need to update the data!
|
||||||
|
|
||||||
if(e->mPostedGroupId == mPostedGroup.mMeta.mGroupId)
|
RsGxsPostedEvent E(*e);
|
||||||
RsThread::async([this, e]()
|
|
||||||
|
if(E.mPostedGroupId == mPostedGroup.mMeta.mGroupId)
|
||||||
|
RsThread::async([this, E]()
|
||||||
{
|
{
|
||||||
// 1 - get message data from p3GxsChannels
|
// 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<RsGxsComment> comments;
|
||||||
std::vector<RsGxsVote> votes;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,10 +120,10 @@ void RsPostedPostsModel::handleEvent_main_thread(std::shared_ptr<const RsEvent>
|
||||||
},this);
|
},this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsPostedPostsModel::initEmptyHierarchy()
|
void RsPostedPostsModel::initEmptyHierarchy()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue