mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 19:26:31 -04:00
async markRead in channels to make it faster
This commit is contained in:
parent
7fe5d390e4
commit
eef16461d6
1 changed files with 1 additions and 1 deletions
|
@ -796,7 +796,7 @@ void RsGxsChannelPostsModel::setAllMsgReadStatus(bool read_status)
|
||||||
// 2 - then call the async methods
|
// 2 - then call the async methods
|
||||||
|
|
||||||
for(uint32_t i=0;i<pairs.size();++i)
|
for(uint32_t i=0;i<pairs.size();++i)
|
||||||
RsThread::async([p=pairs[i], read_status]()
|
RsThread::async([p=pairs[i], read_status]() // use async because each markRead() waits for the token to complete in order to properly acknowledge it.
|
||||||
{
|
{
|
||||||
if(!rsGxsChannels->markRead(p,read_status))
|
if(!rsGxsChannels->markRead(p,read_status))
|
||||||
RsErr() << "setAllMsgReadStatus: failed to change status of msg " << p.first << " in group " << p.second << " to status " << read_status << std::endl;
|
RsErr() << "setAllMsgReadStatus: failed to change status of msg " << p.first << " in group " << p.second << " to status " << read_status << std::endl;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue