mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-05 11:34:50 -04:00
fixed ghost unread forum posts problems by setting read status of all versions of the same post at once. WARNING: this will not remove ghost posts that are already here unless the user reads them again
This commit is contained in:
parent
957435acc7
commit
c04821d91c
1 changed files with 11 additions and 1 deletions
|
@ -1179,6 +1179,16 @@ void RsGxsForumModel::recursSetMsgReadStatus(ForumModelIndex i,bool read_status,
|
||||||
mPosts[i].mMsgStatus = GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
mPosts[i].mMsgStatus = GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
|
|
||||||
|
auto s = getPostVersions(mPosts[i].mMsgId) ;
|
||||||
|
|
||||||
|
if(!s.empty())
|
||||||
|
for(auto it(s.begin());it!=s.end();++it)
|
||||||
|
{
|
||||||
|
rsGxsForums->setMessageReadStatus(token,std::make_pair( mForumGroup.mMeta.mGroupId, it->second ), read_status);
|
||||||
|
std::cerr << "Setting version " << it->second << " of post " << mPosts[i].mMsgId << " as read." << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
rsGxsForums->setMessageReadStatus(token,std::make_pair( mForumGroup.mMeta.mGroupId, mPosts[i].mMsgId ), read_status);
|
rsGxsForums->setMessageReadStatus(token,std::make_pair( mForumGroup.mMeta.mGroupId, mPosts[i].mMsgId ), read_status);
|
||||||
|
|
||||||
if(!with_children)
|
if(!with_children)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue