mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 17:13:58 -05:00
moved update of comment count to libretroshare
This commit is contained in:
parent
e25d8e50fc
commit
c970e94221
2 changed files with 7 additions and 63 deletions
|
|
@ -821,19 +821,6 @@ void GxsChannelPostsWidgetWithModel::handleEvent_main_thread(std::shared_ptr<con
|
|||
return;
|
||||
}
|
||||
|
||||
// Need to call this in order to get the actual comment count. The previous call only retrieves the message, since we supplied the message ID.
|
||||
// another way to go would be to save the comment ids of the existing message and re-insert them before calling getChannelContent.
|
||||
|
||||
if(!rsGxsChannels->getChannelComments(grp_id,{ msg_id },comments))
|
||||
{
|
||||
RsErr() << " failed to retrieve message comment data for channel/msg " << grp_id << "/" << msg_id ;
|
||||
return;
|
||||
}
|
||||
|
||||
// Normally, there's a single post in the "post" array. The function below takes a full array of posts however.
|
||||
|
||||
RsGxsChannelPostsModel::computeCommentCounts(posts,comments);
|
||||
|
||||
// 2 - update the model in the UI thread.
|
||||
|
||||
RsQThreadUtils::postToObject( [post=posts[0],this]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue