summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-03-20 21:00:26 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-03-20 21:00:26 +0200
commit4434c3371cad29b57eafab5cef70be7f3ec463c5 (patch)
tree750e02e5b296390f2bc088aeb037fadcaada1f9f
parent2b3254ef241918a9dadc45332b3f54d1e96889f0 (diff)
SL-2857 Fixed Role picker stuck on Loading
-rw-r--r--indra/newview/llgroupmgr.cpp4
-rw-r--r--indra/newview/llgroupmgr.h5
-rw-r--r--indra/newview/llpanelgroupinvite.cpp19
3 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 152d0eddcd..088d052533 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -2137,6 +2137,7 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
static U32 lastGroupMemberRequestFrame = 0;
// Have we requested the information already this frame?
+ // Todo: make this per group, we can invite to one group and simultaneously be checking another one
if ((lastGroupMemberRequestFrame == gFrameCount) || (mMemberRequestInFlight))
return;
@@ -2166,6 +2167,9 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
return;
}
+ LLGroupMgrGroupData* group_datap = createGroupData(group_id); //make sure group exists
+ group_datap->mMemberRequestID.generate(); // mark as pending
+
lastGroupMemberRequestFrame = gFrameCount;
LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro",
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 940ef6eea1..cf9735e38a 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -258,6 +258,11 @@ public:
bool isRoleMemberDataComplete() { return mRoleMemberDataComplete; }
bool isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
+ bool isMemberDataPending() { return mMemberRequestID.notNull(); }
+ bool isRoleDataPending() { return mRoleDataRequestID.notNull(); }
+ bool isRoleMemberDataPending() { return (mRoleMembersRequestID.notNull() || mPendingRoleMemberRequest); }
+ bool isGroupTitlePending() { return mTitlesRequestID.notNull(); }
+
bool isSingleMemberNotOwner();
F32 getAccessTime() const { return mAccessTime; }
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 82ea8377de..d6b66ee622 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -606,11 +606,30 @@ void LLPanelGroupInvite::updateLists()
{
if (!mPendingUpdate)
{
+ // Note: this will partially fail if some requests are already in progress
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mImplementation->mGroupID);
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
}
+ else if (gdatap)
+ {
+ // restart requests that were interrupted/dropped/failed to start
+ if (!gdatap->isRoleDataPending() && !gdatap->isRoleDataComplete())
+ {
+ LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ }
+ if (!gdatap->isRoleMemberDataPending() && !gdatap->isRoleMemberDataComplete())
+ {
+ LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mImplementation->mGroupID);
+ }
+ // sendCapGroupMembersRequest has a per frame send limitation that could have
+ // interrupted previous request
+ if (!gdatap->isMemberDataPending() && !gdatap->isMemberDataComplete())
+ {
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
+ }
+ }
mPendingUpdate = TRUE;
}
else