From af76cf028c22a4711735f95d94e70152e2c82959 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Dec 2020 16:31:23 +0100 Subject: [PATCH 1/6] always hide edit post button in channel feeds. Feed is not the place for editing posts --- retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index fa37f17a1..8c038c544 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -163,7 +163,7 @@ void GxsChannelPostItem::setup() ui->downloadButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/download.png")); ui->playButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/play.png")); ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png")); - ui->editButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/pencil-edit-button.png")); + //ui->editButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/pencil-edit-button.png")); ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png")); ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png")); ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png")); @@ -196,7 +196,7 @@ void GxsChannelPostItem::setup() connect(ui->commentButton, SIGNAL(clicked()), this, SLOT(loadComments())); connect(ui->playButton, SIGNAL(clicked()), this, SLOT(play(void))); - connect(ui->editButton, SIGNAL(clicked()), this, SLOT(edit(void))); + //connect(ui->editButton, SIGNAL(clicked()), this, SLOT(edit(void))); connect(ui->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyMessageLink())); connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool))); @@ -454,8 +454,8 @@ void GxsChannelPostItem::fill() ui->logoLabel->setPixmap(thumbnail); } - if( !IS_GROUP_PUBLISHER(mGroupMeta.mSubscribeFlags) ) - ui->editButton->hide() ; + //if( !IS_GROUP_PUBLISHER(mGroupMeta.mSubscribeFlags) ) + ui->editButton->hide() ; // never show this button. Feeds are not the place to edit posts. if (!mIsHome) { From dbd6477acd07d73df960b6c8c69c90719f9ccd15 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Dec 2020 20:12:03 +0100 Subject: [PATCH 2/6] fixed bug in circle chooser that showed duplicates. Removed mCircleExternalIdList (not really useful now that circles are cached) and used a std::set to ensure uniqueness --- libretroshare/src/retroshare/rsgxscircles.h | 6 +- libretroshare/src/services/p3gxscircles.cc | 123 +----------------- libretroshare/src/services/p3gxscircles.h | 14 +- .../src/gui/gxs/GxsCircleChooser.cpp | 9 +- 4 files changed, 12 insertions(+), 140 deletions(-) diff --git a/libretroshare/src/retroshare/rsgxscircles.h b/libretroshare/src/retroshare/rsgxscircles.h index 8379c2b16..8130cb602 100644 --- a/libretroshare/src/retroshare/rsgxscircles.h +++ b/libretroshare/src/retroshare/rsgxscircles.h @@ -312,8 +312,7 @@ public: * @param[out] details Storage for the circle details * @return false if something failed, true otherwhise */ - virtual bool getCircleDetails( - const RsGxsCircleId& id, RsGxsCircleDetails& details ) = 0; + virtual bool getCircleDetails(const RsGxsCircleId& id, RsGxsCircleDetails& details ) = 0; /** * @brief Get list of known external circles ids. Memory cached @@ -321,8 +320,7 @@ public: * @param[in] circleIds Storage for circles id list * @return false if something failed, true otherwhise */ - virtual bool getCircleExternalIdList( - std::list& circleIds ) = 0; + virtual bool getCircleExternalIdList(std::set& circleIds ) = 0; /** * @brief Get circles summaries list. diff --git a/libretroshare/src/services/p3gxscircles.cc b/libretroshare/src/services/p3gxscircles.cc index 437966ee1..707d58dbe 100644 --- a/libretroshare/src/services/p3gxscircles.cc +++ b/libretroshare/src/services/p3gxscircles.cc @@ -153,7 +153,7 @@ p3GxsCircles::p3GxsCircles( RsGeneralDataService *gds, RsNetworkExchangeService mLastCacheUpdateEvent = 0; mLastDebugPrintTS = 0; - RsTickEvent::schedule_now(CIRCLE_EVENT_LOADIDS); + RsTickEvent::schedule_now(CIRCLE_EVENT_CACHELOAD); mDummyIdToken = 0; } @@ -654,10 +654,8 @@ void p3GxsCircles::notifyChanges(std::vector &changes) // for new circles we need to add them to the list. // we don't know the type of this circle here // original behavior was to add all ids to the external ids list - - addCircleIdToList(RsGxsCircleId(*git), 0); - circles_to_reload.insert(RsGxsCircleId(*git)); + } // fallthrough case RsGxsNotify::TYPE_STATISTICS_CHANGED: { @@ -824,7 +822,7 @@ bool p3GxsCircles::getCircleDetails(const RsGxsCircleId& id, RsGxsCircleDetails& return false; } -bool p3GxsCircles::getCircleExternalIdList(std::list &circleIds) +bool p3GxsCircles::getCircleExternalIdList(std::set &circleIds) { #ifdef DEBUG_CIRCLES std::cerr << "p3GxsCircles::getCircleIdList()"; @@ -832,14 +830,10 @@ bool p3GxsCircles::getCircleExternalIdList(std::list &circleIds) #endif // DEBUG_CIRCLES RsStackMutex stack(mCircleMtx); /********** STACK LOCKED MTX ******/ - if (circleIds.empty()) - circleIds = mCircleExternalIdList; - else - { - std::list::const_iterator it; - for(it = mCircleExternalIdList.begin(); it != mCircleExternalIdList.begin(); ++it) - circleIds.push_back(*it); - } + + for(auto& cache: mCircleCache) + if(cache.second.mIsExternal) + circleIds.insert(cache.first); return true; } @@ -1006,18 +1000,6 @@ bool p3GxsCircles::getMsgData(const uint32_t &token, std::vector for(; vit != msgItems.end(); ++vit) { -#ifdef TO_REMOVE - RsGxsCircleMsgItem* item = dynamic_cast(*vit); - - if(item) - { - RsGxsCircleMsg msg = item->mMsg; - msg.mMeta = item->meta; - msgs.push_back(msg); - delete item; - } -#endif - RsGxsCircleSubscriptionRequestItem* rsItem = dynamic_cast(*vit); if (rsItem) @@ -1087,10 +1069,6 @@ RsGenExchange::ServiceCreate_Return p3GxsCircles::service_CreateGroup(RsGxsGrpIt item->meta.mCircleId = RsGxsCircleId(item->meta.mGroupId); } - // the advantage of adding the id to the list now is, that we know the cirlce type at this point - // this is not the case in NotifyChanges() - addCircleIdToList(RsGxsCircleId(item->meta.mGroupId), item->meta.mCircleType); - return SERVICE_CREATE_SUCCESS; } @@ -1210,67 +1188,6 @@ bool RsGxsCircleCache::addLocalFriend(const RsPgpId &pgpId) return true; } -/************************************************************************************/ -/************************************************************************************/ - -bool p3GxsCircles::request_CircleIdList() -{ - /* trigger request to load missing ids into cache */ -#ifdef DEBUG_CIRCLES - std::cerr << "p3GxsCircles::request_CircleIdList()"; - std::cerr << std::endl; -#endif // DEBUG_CIRCLES - - uint32_t ansType = RS_TOKREQ_ANSTYPE_SUMMARY; - RsTokReqOptions opts; - opts.mReqType = GXS_REQUEST_TYPE_GROUP_META; - - uint32_t token = 0; - - RsGenExchange::getTokenService()->requestGroupInfo(token, ansType, opts); - GxsTokenQueue::queueRequest(token, CIRCLEREQ_CIRCLE_LIST); - return true; -} - - -bool p3GxsCircles::load_CircleIdList(uint32_t token) -{ -#ifdef DEBUG_CIRCLES - std::cerr << "p3GxsCircles::load_CircleIdList() : " << token; - std::cerr << std::endl; -#endif // DEBUG_CIRCLES - - std::list groups; - bool ok = RsGenExchange::getGroupMeta(token, groups); - - if(ok) - { - // Save List - { - RsStackMutex stack(mCircleMtx); /********** STACK LOCKED MTX ******/ - mCirclePersonalIdList.clear(); - mCircleExternalIdList.clear(); - } - - for(std::list::iterator it = groups.begin(); it != groups.end(); ++it) - { - addCircleIdToList(RsGxsCircleId(it->mGroupId), it->mCircleType); - } - } - else - { - std::cerr << "p3GxsCircles::load_CircleIdList() ERROR no data"; - std::cerr << std::endl; - - return false; - } - return true; -} - - - - - /************************************************************************************/ /************************************************************************************/ /************************************************************************************/ @@ -1713,24 +1630,6 @@ bool p3GxsCircles::locked_checkCircleCacheForAutoSubscribe(RsGxsCircleCache& cac return true; } -void p3GxsCircles::addCircleIdToList(const RsGxsCircleId &circleId, uint32_t circleType) -{ - RsStackMutex stack(mCircleMtx); /********** STACK LOCKED MTX ******/ - - if (circleType == GXS_CIRCLE_TYPE_LOCAL) - { - if(mCirclePersonalIdList.end() == std::find(mCirclePersonalIdList.begin(), mCirclePersonalIdList.end(), circleId)){ - mCirclePersonalIdList.push_back(circleId); - } - } - else - { - if(mCircleExternalIdList.end() == std::find(mCircleExternalIdList.begin(), mCircleExternalIdList.end(), circleId)){ - mCircleExternalIdList.push_back(circleId); - } - } -} - bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) { #ifdef GXSFORUMS_CHANNELS @@ -1802,10 +1701,6 @@ void p3GxsCircles::handleResponse(uint32_t token, uint32_t req_type) // stuff. switch(req_type) { - case CIRCLEREQ_CIRCLE_LIST: - load_CircleIdList(token); - break; - case CIRCLEREQ_MESSAGE_DATA: processMembershipRequests(token); break; @@ -1831,10 +1726,6 @@ void p3GxsCircles::handle_event(uint32_t event_type, const std::string &elabel) // stuff. switch(event_type) { - case CIRCLE_EVENT_LOADIDS: - request_CircleIdList(); - break; - case CIRCLE_EVENT_CACHELOAD: cache_start_load(); break; diff --git a/libretroshare/src/services/p3gxscircles.h b/libretroshare/src/services/p3gxscircles.h index ebb84a481..178ec2aaf 100644 --- a/libretroshare/src/services/p3gxscircles.h +++ b/libretroshare/src/services/p3gxscircles.h @@ -271,7 +271,7 @@ public: ) override; virtual bool getCircleDetails(const RsGxsCircleId &id, RsGxsCircleDetails &details) override; - virtual bool getCircleExternalIdList(std::list &circleIds) override; + virtual bool getCircleExternalIdList(std::set &circleIds) override; virtual bool isLoaded(const RsGxsCircleId &circleId) override; virtual bool loadCircle(const RsGxsCircleId &circleId) override; @@ -326,8 +326,6 @@ protected: private: // Load data. - bool request_CircleIdList(); - bool load_CircleIdList(uint32_t token); bool processMembershipRequests(uint32_t token); // Need some crazy arsed cache to store the circle info. @@ -351,21 +349,11 @@ protected: p3IdService *mIdentities; // Needed for constructing Circle Info, PgpAuxUtils *mPgpUtils; - // put a circle id into the external or personal circle id list - // this function locks the mutex - // if the id is already in the list, it will not be added again - // G10h4ck: this is terrible, an std::set instead of a list should be used - // to guarantee uniqueness - void addCircleIdToList(const RsGxsCircleId& circleId, uint32_t circleType); - RsMutex mCircleMtx; /* Locked Below Here */ RsMutex mKnownCirclesMtx; /* Locked Below Here */ std::map mKnownCircles; - std::list mCircleExternalIdList; - std::list mCirclePersonalIdList; - /***** Caching Circle Info, *****/ // waiting for subcircle to load. (first is part of each of the second list) diff --git a/retroshare-gui/src/gui/gxs/GxsCircleChooser.cpp b/retroshare-gui/src/gui/gxs/GxsCircleChooser.cpp index bff6be150..630a3efbe 100644 --- a/retroshare-gui/src/gui/gxs/GxsCircleChooser.cpp +++ b/retroshare-gui/src/gui/gxs/GxsCircleChooser.cpp @@ -63,7 +63,7 @@ bool MakeGxsCircleDesc(const RsGxsCircleId &id, QString &desc) void GxsCircleChooser::loadGxsCircles() { - std::list ids; + std::set ids; rsGxsCircles->getCircleExternalIdList(ids); if (ids.empty()) @@ -73,10 +73,9 @@ void GxsCircleChooser::loadGxsCircles() return; } - std::list::iterator it; int i = 0; int def = -1; - for(it = ids.begin(); it != ids.end(); ++it, ++i) + for(auto it(ids.begin()); it != ids.end(); ++it, ++i) { /* add to Chooser */ QString str; @@ -91,15 +90,11 @@ void GxsCircleChooser::loadGxsCircles() addItem(str, id); if (mDefaultCircleId == *it) - { def = i; - } } if (def >= 0) - { setCurrentIndex(def); - } } bool GxsCircleChooser::getChosenCircle(RsGxsCircleId &id) From d5d03149409e6d530cfff34a3bd69089cd893a32 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Dec 2020 20:50:36 +0100 Subject: [PATCH 3/6] always show empty groups in FriendList so that they still can be deleted --- retroshare-gui/src/gui/common/NewFriendList.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/retroshare-gui/src/gui/common/NewFriendList.cpp b/retroshare-gui/src/gui/common/NewFriendList.cpp index df59e37a6..318828d4a 100644 --- a/retroshare-gui/src/gui/common/NewFriendList.cpp +++ b/retroshare-gui/src/gui/common/NewFriendList.cpp @@ -134,14 +134,8 @@ public: QModelIndex index = sourceModel()->index(source_row,0,source_parent); - if(index.data(RsFriendListModel::TypeRole) == RsFriendListModel::ENTRY_TYPE_GROUP) - { - RsGroupInfo group_info ; - static_cast(sourceModel())->getGroupData(index,group_info); - - if(group_info.peerIds.empty()) - return false; - } + if(index.data(RsFriendListModel::TypeRole) == RsFriendListModel::ENTRY_TYPE_GROUP) // always show groups, so we can delete them even when empty + return true; // Filter offline friends From b3a6ec67de2123d40e041b6ca88b0dd8fdd25881 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Dec 2020 21:04:04 +0100 Subject: [PATCH 4/6] improved description of what Last Post means in boards and channels, added tooltips --- .../gui/Posted/PostedListWidgetWithModel.ui | 52 ++++++++++++------- .../GxsChannelPostsWidgetWithModel.ui | 27 ++++++---- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui index 4e17f5d0a..70d460039 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui @@ -152,6 +152,9 @@ + + <html><head/><body><p>This includes posts, comments to posts and votes to comments.</p></body></html> + unknown @@ -217,8 +220,11 @@ true + + <html><head/><body><p>This includes posts, comments to posts and votes to comments.</p></body></html> + - Last Post: + Last activity: @@ -230,6 +236,9 @@ true + + <html><head/><body><p>Includes all posts, comments and votes. This number is progressively updates when new friend connect. The local vs. at friends difference may indicate that you would get older posts by increasing the synchronization period.</p></body></html> + 0 @@ -269,7 +278,7 @@ - Popularity + Popularity: @@ -287,8 +296,11 @@ true + + <html><head/><body><p>Includes all posts, comments and votes. This number is progressively updated when new friend connect. The local vs. at friends difference may indicate that you would get older posts by increasing the synchronization period.</p></body></html> + - Posts + Contributions: @@ -340,7 +352,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html> @@ -592,23 +604,16 @@ p, li { white-space: pre-wrap; } + + GxsIdChooser + QComboBox +
gui/gxs/GxsIdChooser.h
+
LineEditClear QLineEdit
gui/common/LineEditClear.h
- - RSTabWidget - QTabWidget -
gui/common/RSTabWidget.h
- 1 -
- - RSTreeView - QTreeView -
gui/common/RSTreeView.h
- 1 -
GxsIdLabel QLabel @@ -620,14 +625,21 @@ p, li { white-space: pre-wrap; }
gui/common/SubscribeToolButton.h
- GxsIdChooser - QComboBox -
gui/gxs/GxsIdChooser.h
+ RSTreeView + QTreeView +
gui/common/RSTreeView.h
+ 1 +
+ + RSTabWidget + QTabWidget +
gui/common/RSTabWidget.h
+ 1
- + diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.ui b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.ui index cec64ed95..be78f618e 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.ui +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.ui @@ -234,6 +234,9 @@ + + <html><head/><body><p>Includes all posts, comments and votes. This number is progressively updated when new friend connect. The local vs. at friends difference may indicate that you would get older posts by increasing the synchronization period.</p></body></html> + 0 @@ -251,6 +254,9 @@ + + <html><head/><body><p>This includes posts, comments to posts and votes to comments.</p></body></html> + unknown @@ -277,8 +283,11 @@ true
+ + <html><head/><body><p>This includes posts, comments to posts and votes to comments.</p></body></html> + - Last Post: + Last activity: @@ -310,7 +319,7 @@ - <html><head/><body><p align="justify">The number of posts at friends is progressively updated.</p><p align="justify">The new numbers will show next time you load this channel.</p><p align="justify">The two numbers differ depending on your friends synchronization</p><p>time limits as well as yours.</p></body></html> + <html><head/><body><p>Includes all posts, comments and votes. This number is progressively updated when new friend connect. The local vs. at friends difference may indicate that you would get older posts by increasing the synchronization period.</p></body></html> Posts (locally / at friends): @@ -380,7 +389,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html> @@ -627,18 +636,18 @@ p, li { white-space: pre-wrap; } LineEditClear QLineEdit -
gui/common/LineEditClear.h
-
- - SubscribeToolButton - QToolButton -
gui/common/SubscribeToolButton.h
+
gui/common/LineEditClear.h
GxsIdLabel QLabel
gui/gxs/GxsIdLabel.h
+ + SubscribeToolButton + QToolButton +
gui/common/SubscribeToolButton.h
+
RSTreeView QTreeView From 4db0ed9fa9a58a7ccb064cc6b6656469b23623c9 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Dec 2020 21:07:55 +0100 Subject: [PATCH 5/6] replaced remaining term "chat lobby" for "chat room" --- retroshare-gui/src/gui/ChatLobbyWidget.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/ChatLobbyWidget.ui b/retroshare-gui/src/gui/ChatLobbyWidget.ui index d3e6e03e2..4a4f863ef 100644 --- a/retroshare-gui/src/gui/ChatLobbyWidget.ui +++ b/retroshare-gui/src/gui/ChatLobbyWidget.ui @@ -159,7 +159,7 @@ - Create chat lobby + <html><head/><body><p>Create new chat room</p></body></html> From 931be5dc6d79852b8d9589c8db9a38582f15a63d Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 6 Dec 2020 21:29:56 +0100 Subject: [PATCH 6/6] fixed update of forum and circle lists when forum/circle is edited --- libretroshare/src/retroshare/rsgxscircles.h | 5 +++++ libretroshare/src/services/p3gxscircles.cc | 13 ++++++++++++- libretroshare/src/services/p3gxsforums.cc | 12 ++++++++++++ .../src/gui/gxsforums/GxsForumsDialog.cpp | 3 ++- 4 files changed, 31 insertions(+), 2 deletions(-) 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);