From 104e12210298951cc901316edf41e653ff4441d7 Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 14 Jan 2019 23:51:53 +0100 Subject: [PATCH] fixed not working setAsReadOnActivate preferences/forum button --- retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 62c85c74b..29f6a6103 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -995,7 +995,10 @@ void GxsForumThreadWidget::changedThread(QModelIndex index) #ifdef DEBUG_FORUMS std::cerr << "Setting message read status to true" << std::endl; #endif - mThreadModel->setMsgReadStatus(src_index, true,false); + bool setToReadOnActive = Settings->getForumMsgSetToReadOnActivate(); + + if(setToReadOnActive) + mThreadModel->setMsgReadStatus(src_index, true,false); } void GxsForumThreadWidget::clickedThread(QModelIndex index) @@ -1301,10 +1304,10 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg) uint32_t overall_reputation = rsReputations->overallReputationLevel(msg.mMeta.mAuthorId) ; bool redacted = (overall_reputation == RsReputations::REPUTATION_LOCALLY_NEGATIVE) ; +#ifdef TO_REMOVE bool setToReadOnActive = Settings->getForumMsgSetToReadOnActivate(); uint32_t status = msg.mMeta.mMsgStatus ;//item->data(RsGxsForumModel::COLUMN_THREAD_DATA, ROLE_THREAD_STATUS).toUInt(); -#ifdef TO_REMOVE QModelIndex index = getCurrentIndex(); if (IS_MSG_NEW(status)) { if (setToReadOnActive) {