diff --git a/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp b/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp index 02af1afc3..684b85e54 100644 --- a/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp +++ b/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp @@ -287,14 +287,13 @@ void BaseBoardsCommentsItem::readToggled(bool checked) return; } + setReadStatus(false, checked); // Can't call this inside an async call since the widget may be destroyed afterwards! + // So we do it right away. + RsThread::async( [this,checked]() { RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId()); rsPosted->setCommentReadStatus(msgPair, !checked); - - RsQThreadUtils::postToObject( [this,checked]() { - setReadStatus(false, checked); - } ); }); }