fixed crash in setting posted items as read

This commit is contained in:
csoler 2023-05-07 17:09:00 +02:00
parent 2f2495455f
commit 082603917c

View File

@ -282,16 +282,12 @@ void BasePostedItem::readToggled(bool checked)
if (mInFill) {
return;
}
setReadStatus(false, checked);
RsThread::async([this,checked]()
{
RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId());
rsPosted->setPostReadStatus(msgPair, !checked);
RsQThreadUtils::postToObject( [checked,this]()
{
setReadStatus(false, checked);
}, this );
});
}