mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 23:40:26 -04:00
added menu entry to switch single post as unread, and fixed the setAllMsgAsRead function
This commit is contained in:
parent
96a8c23f1e
commit
8d6bd1a0b8
3 changed files with 16 additions and 20 deletions
|
@ -702,11 +702,15 @@ void RsGxsChannelPostsModel::setAllMsgReadStatus(bool read_status)
|
|||
{
|
||||
for(uint32_t i=0;i<mPosts.size();++i)
|
||||
{
|
||||
bool post_status = (IS_MSG_UNREAD(mPosts[i].mMeta.mMsgStatus) || IS_MSG_NEW(mPosts[i].mMeta.mMsgStatus));
|
||||
bool post_status = !((IS_MSG_UNREAD(mPosts[i].mMeta.mMsgStatus) || IS_MSG_NEW(mPosts[i].mMeta.mMsgStatus)));
|
||||
|
||||
if(post_status != read_status)
|
||||
{
|
||||
std::cerr << "Switch read status of post " << mPosts[i].mMeta.mMsgId << std::endl;
|
||||
|
||||
if(!rsGxsChannels->markRead(RsGxsGrpMsgIdPair(mPosts[i].mMeta.mGroupId,mPosts[i].mMeta.mMsgId),read_status))
|
||||
RsErr() << "setAllMsgReadStatus: failed to change status of msg " << mPosts[i].mMeta.mMsgId << " in group " << mPosts[i].mMeta.mGroupId << " to status " << read_status << std::endl;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue