mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05: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
@ -1179,7 +1179,17 @@ void RsGxsForumModel::recursSetMsgReadStatus(ForumModelIndex i,bool read_status,
|
||||
mPosts[i].mMsgStatus = GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||
|
||||
uint32_t token;
|
||||
rsGxsForums->setMessageReadStatus(token,std::make_pair( mForumGroup.mMeta.mGroupId, mPosts[i].mMsgId ), read_status);
|
||||
|
||||
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);
|
||||
|
||||
if(!with_children)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user