made group notifications separate so that they can be treated more easily and added group item to new_group notifications, to allow more GUI notifications

This commit is contained in:
csoler 2020-05-01 00:00:13 +02:00
parent 767440afc5
commit d32daaa111
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
8 changed files with 293 additions and 375 deletions

View file

@ -656,6 +656,8 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
#ifdef DEBUG_GXSTRANS
std::cout << "p3GxsTrans::notifyChanges(...)" << std::endl;
#endif
std::list<RsGxsGroupId> grps_to_request;
for( auto it = changes.begin(); it != changes.end(); ++it )
{
RsGxsGroupChange* grpChange = dynamic_cast<RsGxsGroupChange *>(*it);
@ -666,7 +668,7 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
#ifdef DEBUG_GXSTRANS
std::cout << "p3GxsTrans::notifyChanges(...) grpChange" << std::endl;
#endif
requestGroupsData(&(grpChange->mGrpIdList));
grps_to_request.push_back(grpChange->mGroupId);
}
else if(msgChange)
{
@ -698,6 +700,9 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
}
delete *it;
}
if(!grps_to_request.empty())
requestGroupsData(&grps_to_request);
}
uint32_t p3GxsTrans::AuthenPolicy()