SL-10400 - more on group limits from SimulatorFeatures

meow-7.2.2
Brad Payne (Vir Linden) 2019-04-26 14:23:57 +01:00
parent 06009e9b53
commit a44f03573d
1 changed files with 12 additions and 1 deletions

View File

@ -614,12 +614,23 @@ void LLPanelPeople::removePicker()
BOOL LLPanelPeople::postBuild()
{
S32 max_premium = PREMIUM_MAX_AGENT_GROUPS;
if (gAgent.getRegion())
{
LLSD features;
gAgent.getRegion()->getSimulatorFeatures(features);
if (features.has("MaxAgentGroupsPremium"))
{
max_premium = features["MaxAgentGroupsPremium"].asInteger();
}
}
getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
if(gMaxAgentGroups <= BASE_MAX_AGENT_GROUPS)
if(gMaxAgentGroups < max_premium)
{
getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo"));
getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));