mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 07:41:20 -04:00
only switch read/unread status when necessary
This commit is contained in:
parent
89444537b1
commit
ca49232ff1
1 changed files with 6 additions and 1 deletions
|
@ -701,7 +701,12 @@ void RsGxsChannelPostsModel::setAllMsgReadStatus(bool read_status)
|
|||
RsThread::async([this, 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));
|
||||
|
||||
if(post_status != read_status)
|
||||
rsGxsChannels->markRead(RsGxsGrpMsgIdPair(mPosts[i].mMeta.mGroupId,mPosts[i].mMeta.mMsgId),read_status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue