From 2cb87368042675a01ceb658e9d2f3efda77e12c0 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 22 Apr 2023 15:02:32 +0200 Subject: [PATCH] fixed update of forum when marking msg as read/unread with children --- retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp index 77292dadf..d793c29fe 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp @@ -1278,8 +1278,8 @@ void RsGxsForumModel::recursSetMsgReadStatus(ForumModelIndex i,bool read_status, void *ref ; convertTabEntryToRefPointer(i,ref); // we dont use i+1 here because i is not a row, but an index in the mPosts tab - QModelIndex itemIndex = createIndex(i - 1, 0, ref); - emit dataChanged(itemIndex, itemIndex); + QModelIndex itemIndex = (mTreeMode == TREE_MODE_FLAT)?createIndex(i - 1, 0, ref):createIndex(mPosts[i].prow,0,ref); + emit dataChanged(itemIndex, itemIndex); } if(!with_children)