diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 15d0aa9e9..e219821f2 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -2010,7 +2010,7 @@ void RsGenExchange::processMsgMetaChanges() if (!msgIds.empty()) { RS_STACK_MUTEX(mGenMtx); - RsGxsMsgChange* c = new RsGxsMsgChange(RsGxsNotify::TYPE_PROCESSED, true); + RsGxsMsgChange* c = new RsGxsMsgChange(RsGxsNotify::TYPE_PROCESSED, false); c->msgChangeMap = msgIds; mNotifications.push_back(c); } diff --git a/libretroshare/src/services/p3gxschannels.cc b/libretroshare/src/services/p3gxschannels.cc index e70769c7a..beb828fdf 100644 --- a/libretroshare/src/services/p3gxschannels.cc +++ b/libretroshare/src/services/p3gxschannels.cc @@ -218,8 +218,7 @@ RsGenExchange::ServiceCreate_Return p3GxsChannels::service_CreateGroup(RsGxsGrpI void p3GxsChannels::notifyChanges(std::vector &changes) { #ifdef GXSCHANNELS_DEBUG - std::cerr << "p3GxsChannels::notifyChanges()"; - std::cerr << std::endl; + std::cerr << "p3GxsChannels::notifyChanges() : " << changes.size() << "changes to notify" << std::endl; #endif p3Notify *notify = NULL; diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.cpp b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.cpp index bf092c3cc..a657959a9 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.cpp +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.cpp @@ -68,7 +68,13 @@ void RsGxsUpdateBroadcastBase::updateBroadcastChanged() /* Update only update when the widget is visible. */ if (mUpdateWhenInvisible || !widget || widget->isVisible()) { - if (!mGrpIds.empty() || !mGrpIdsMeta.empty() || !mMsgIds.empty() || !mMsgIdsMeta.empty()) + // (cyril) Re-load the entire group is new messages are here, or if group metadata has changed (e.g. visibility permissions, admin rights, etc). + // Do not re-load if Msg data has changed, which means basically the READ flag has changed, because this action is done in the UI in the + // first place so there's no need to re-update the UI once this is done. + // + // The question to whether we should re=load when mGrpIds is not empty is still open. It's not harmful anyway. + + if (!mGrpIds.empty() || !mGrpIdsMeta.empty() /*|| !mMsgIds.empty()*/ || !mMsgIdsMeta.empty()) mFillComplete = true ; securedUpdateDisplay(); diff --git a/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp b/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp index cbda167cb..35da468da 100644 --- a/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp +++ b/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp @@ -45,20 +45,21 @@ RsGxsUpdateBroadcast *RsGxsUpdateBroadcast::get(RsGxsIfaceHelper *ifaceImpl) void RsGxsUpdateBroadcast::onChangesReceived(const RsGxsChanges& changes) { -#ifdef DEBUG_GXS_BROADCAST +#ifndef DEBUG_GXS_BROADCAST std::cerr << "onChangesReceived()" << std::endl; { std::cerr << "Received changes for service " << (void*)changes.mService << ", expecting service " << (void*)mIfaceImpl->getTokenService() << std::endl; - std::cerr << " changes content: " << std::endl; - for(std::list::const_iterator it(changes.mGrps.begin());it!=changes.mGrps.end();++it) std::cerr << " grp id: " << *it << std::endl; - for(std::list::const_iterator it(changes.mGrpsMeta.begin());it!=changes.mGrpsMeta.end();++it) std::cerr << " grp meta: " << *it << std::endl; + for(std::list::const_iterator it(changes.mGrps.begin());it!=changes.mGrps.end();++it) + std::cerr << "[GRP CHANGE] grp id: " << *it << std::endl; + for(std::list::const_iterator it(changes.mGrpsMeta.begin());it!=changes.mGrpsMeta.end();++it) + std::cerr << "[GRP CHANGE] grp meta: " << *it << std::endl; for(std::map >::const_iterator it(changes.mMsgs.begin());it!=changes.mMsgs.end();++it) for(uint32_t i=0;isecond.size();++i) - std::cerr << " grp id: " << it->first << ". Msg ID " << it->second[i] << std::endl; + std::cerr << "[MSG CHANGE] grp id: " << it->first << ". Msg ID " << it->second[i] << std::endl; for(std::map >::const_iterator it(changes.mMsgsMeta.begin());it!=changes.mMsgsMeta.end();++it) for(uint32_t i=0;isecond.size();++i) - std::cerr << " grp id: " << it->first << ". Msg Meta " << it->second[i] << std::endl; + std::cerr << "[MSG CHANGE] grp id: " << it->first << ". Msg Meta " << it->second[i] << std::endl; } #endif if(changes.mService != mIfaceImpl->getTokenService())