diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsModel.cpp index 508db7046..865cd776b 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsModel.cpp @@ -498,7 +498,14 @@ void RsGxsChannelPostsModel::updateSinglePost(const RsGxsChannelPost& post,std:: added_files.insert(post.mFiles.begin(),post.mFiles.end()); removed_files.insert(mPosts[j].mFiles.begin(),mPosts[j].mFiles.end()); + auto save_ucc = mPosts[j].mUnreadCommentCount; + auto save_cc = mPosts[j].mCommentCount; + mPosts[j] = post; + + mPosts[j].mUnreadCommentCount = save_ucc; + mPosts[j].mCommentCount = save_cc; + #ifdef DEBUG_CHANNEL_MODEL RsDbg() << " post is an updated existing post." ; #endif @@ -512,7 +519,13 @@ void RsGxsChannelPostsModel::updateSinglePost(const RsGxsChannelPost& post,std:: removed_files.insert(mPosts[j].mFiles.begin(),mPosts[j].mFiles.end()); auto old_post_id = mPosts[j].mMeta.mMsgId; + auto save_ucc = mPosts[j].mUnreadCommentCount; + auto save_cc = mPosts[j].mCommentCount; + mPosts[j] = post; + + mPosts[j].mCommentCount += save_cc; + mPosts[j].mUnreadCommentCount += save_ucc; mPosts[j].mOlderVersions.insert(old_post_id); #ifdef DEBUG_CHANNEL_MODEL RsDbg() << " post is an new version of an existing post." ; diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp index ed721a66a..e63b96633 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp @@ -805,7 +805,6 @@ void GxsChannelPostsWidgetWithModel::handleEvent_main_thread(std::shared_ptr