From 8b5e43f2b034038e6efb1464175fcbc1fa2aedf3 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 28 May 2016 17:18:25 -0400 Subject: [PATCH] remove subitems in circles member list when they are gone from cache --- retroshare-gui/src/gui/Identity/IdDialog.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index fc396ec0f..ca2f572bc 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -536,7 +536,16 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token) #ifdef ID_DEBUG std::cerr << " updating status of all identities for this circle:" << std::endl; #endif - //for(std::list::const_iterator it(own_identities.begin());it!=own_identities.end();++it) + // remove any identity that has an item, but no subscription flag entry + std::vector to_delete ; + + for(uint32_t k=0;kchildCount();++k) + if(details.mSubscriptionFlags.find(RsGxsId(item->child(k)->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString().toStdString())) == details.mSubscriptionFlags.end()) + to_delete.push_back(item->child(k)); + + for(uint32_t k=0;k::const_iterator it(details.mSubscriptionFlags.begin());it!=details.mSubscriptionFlags.end();++it) { #ifdef ID_DEBUG