async markRead in posted to make it faster

This commit is contained in:
csoler 2021-01-24 22:33:13 +01:00
parent 537957a2ea
commit 7fe5d390e4

View File

@ -732,11 +732,11 @@ void RsPostedPostsModel::setAllMsgReadStatus(bool read)
for(uint32_t i=0;i<mPosts.size();++i)
pairs.push_back(RsGxsGrpMsgIdPair(mPosts[i].mMeta.mGroupId,mPosts[i].mMeta.mMsgId));
RsThread::async([read,pairs]()
{
// Call blocking API
for(auto& p:pairs)
RsThread::async([read,p]()
{
rsPosted->setPostReadStatus(p,read);
} );
}