diff --git a/libretroshare/src/retroshare/rsgxscircles.h b/libretroshare/src/retroshare/rsgxscircles.h index 8130cb602..6ff854360 100644 --- a/libretroshare/src/retroshare/rsgxscircles.h +++ b/libretroshare/src/retroshare/rsgxscircles.h @@ -240,6 +240,11 @@ enum class RsGxsCircleEventCode: uint8_t * The circle has been deleted by auto-cleaning. * */ CIRCLE_DELETED = 0x07, + + /** + * Circle has been updated (name, parent circle, type, etc) + * */ + CIRCLE_UPDATED = 0x08, }; struct RsGxsCircleEvent: RsEvent diff --git a/libretroshare/src/services/p3gxscircles.cc b/libretroshare/src/services/p3gxscircles.cc index 707d58dbe..8eca7e3be 100644 --- a/libretroshare/src/services/p3gxscircles.cc +++ b/libretroshare/src/services/p3gxscircles.cc @@ -741,7 +741,18 @@ void p3GxsCircles::notifyChanges(std::vector &changes) rsEvents->postEvent(ev); } - } + if( old_circle_grp_item->meta.mGroupName != new_circle_grp_item->meta.mGroupName + || old_circle_grp_item->meta.mGroupFlags != new_circle_grp_item->meta.mGroupFlags + || old_circle_grp_item->meta.mAuthorId != new_circle_grp_item->meta.mAuthorId + || old_circle_grp_item->meta.mCircleId != new_circle_grp_item->meta.mCircleId + ) + { + auto ev = std::make_shared(); + ev->mCircleId = RsGxsCircleId(new_circle_grp_item->meta.mGroupId); + ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_UPDATED; + rsEvents->postEvent(ev); + } + } else if(c->getType()==RsGxsNotify::TYPE_GROUP_DELETED) { auto ev = std::make_shared(); diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index 6a47d65d0..91b576d32 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -380,6 +380,18 @@ void p3GxsForums::notifyChanges(std::vector &changes) rsEvents->postEvent(ev); } + if( old_forum_grp_item->mGroup.mDescription != new_forum_grp_item->mGroup.mDescription + || old_forum_grp_item->meta.mGroupName != new_forum_grp_item->meta.mGroupName + || old_forum_grp_item->meta.mGroupFlags != new_forum_grp_item->meta.mGroupFlags + || old_forum_grp_item->meta.mAuthorId != new_forum_grp_item->meta.mAuthorId + || old_forum_grp_item->meta.mCircleId != new_forum_grp_item->meta.mCircleId + ) + { + auto ev = std::make_shared(); + ev->mForumGroupId = new_forum_grp_item->meta.mGroupId; + ev->mForumEventCode = RsForumEventCode::UPDATED_FORUM; + rsEvents->postEvent(ev); + } } break; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp index 1a1ceba23..e9aca3971 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp @@ -66,7 +66,8 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr eve updateGroupStatisticsReal(e->mForumGroupId); // update the list immediately break; - case RsForumEventCode::NEW_FORUM: // [[fallthrough]]; + case RsForumEventCode::NEW_FORUM: // [[fallthrough]]; + case RsForumEventCode::UPDATED_FORUM: // [[fallthrough]]; case RsForumEventCode::DELETED_FORUM: // [[fallthrough]]; case RsForumEventCode::SUBSCRIBE_STATUS_CHANGED: updateDisplay(true);