From 79bbe0e5bb0e9fc5e26a9b9c3dfadefa65e24339 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 14:53:53 +0200 Subject: [PATCH] Fix Commit #77adc82 Fix Missing messages when mark all as read. --- .../src/gui/gxsforums/GxsForumThreadWidget.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 6402d130a..1eb8b809e 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -1850,14 +1850,18 @@ void GxsForumThreadWidget::setMsgReadStatus(QList &rows, bool rsGxsForums->setMessageReadStatus(token, msgPair, read); // Look if older version exist to mark them too - QMap > >::const_iterator it = mPostVersions.find(mOrigThreadId) ; + QMap > >::const_iterator it = mPostVersions.find(RsGxsMessageId(msgId)) ; if(it != mPostVersions.end()) { std::cerr << (*it).size() << " versions found " << std::endl; for(int i=0;i<(*it).size();++i) { - msgPair = std::make_pair( groupId(), (*it)[i].second ); - rsGxsForums->setMessageReadStatus(token, msgPair, read); + RsGxsMessageId found = (*it)[i].second; + if(found != RsGxsMessageId(msgId)) + { + msgPair = std::make_pair( groupId(), found ); + rsGxsForums->setMessageReadStatus(token, msgPair, read); + } } }