mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
only switch read/unread status when necessary
This commit is contained in:
parent
89444537b1
commit
ca49232ff1
@ -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…
Reference in New Issue
Block a user