MAINT-5227 FIXED Changing premium access of an account with > 42 groups back to basic account shows negative number of groups that they can join
parent
b59e4a02b6
commit
dd3b9776d2
|
|
@ -85,6 +85,8 @@ static const std::string RECENT_TAB_NAME = "recent_panel";
|
|||
static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars
|
||||
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
|
||||
|
||||
const S32 BASE_MAX_AGENT_GROUPS = 42;
|
||||
const S32 PREMIUM_MAX_AGENT_GROUPS = 60;
|
||||
|
||||
extern S32 gMaxAgentGroups;
|
||||
|
||||
|
|
@ -585,6 +587,7 @@ BOOL LLPanelPeople::postBuild()
|
|||
getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
getChild<LLFilterEditor>("fbc_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
|
||||
|
||||
mTabContainer = getChild<LLTabContainer>("tabs");
|
||||
mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2));
|
||||
|
|
@ -902,8 +905,11 @@ void LLPanelPeople::updateButtons()
|
|||
|
||||
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
|
||||
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
|
||||
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
|
||||
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.size())));
|
||||
|
||||
U32 groups_count = gAgent.mGroups.size();
|
||||
U32 groups_ramaining = gMaxAgentGroups > groups_count ? gMaxAgentGroups - groups_count : 0;
|
||||
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count));
|
||||
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1114,6 +1120,14 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelPeople::onGroupLimitInfo()
|
||||
{
|
||||
LLSD args;
|
||||
args["MAX_BASIC"] = BASE_MAX_AGENT_GROUPS;
|
||||
args["MAX_PREMIUM"] = PREMIUM_MAX_AGENT_GROUPS;
|
||||
LLNotificationsUtil::add("GroupLimitInfo", args);
|
||||
}
|
||||
|
||||
void LLPanelPeople::onTabSelected(const LLSD& param)
|
||||
{
|
||||
std::string tab_name = getChild<LLPanel>(param.asString())->getName();
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ private:
|
|||
|
||||
// UI callbacks
|
||||
void onFilterEdit(const std::string& search_string);
|
||||
void onGroupLimitInfo();
|
||||
void onTabSelected(const LLSD& param);
|
||||
void onAddFriendButtonClicked();
|
||||
void onAddFriendWizButtonClicked();
|
||||
|
|
|
|||
|
|
@ -3973,6 +3973,21 @@ You have reached your maximum number of groups. Please leave some group before j
|
|||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="GroupLimitInfo"
|
||||
type="alert">
|
||||
The group limit for base accounts is [MAX_BASIC], and for [https://secondlife.com/premium/ premium]
|
||||
accounts is [MAX_PREMIUM].
|
||||
If you downgraded your account, you will need to get below [MAX_BASIC] group limit before you can join more.
|
||||
|
||||
[https://secondlife.com/my/account/membership.php Upgrade today!]
|
||||
<tag>group</tag>
|
||||
<usetemplate
|
||||
name="okbutton"
|
||||
yestext="Close"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="KickUser"
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
|
|||
left="3"
|
||||
use_ellipses="true"
|
||||
name="groupcount">
|
||||
You belong to [COUNT] groups, and can join [REMAINING] more.
|
||||
You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Want more?]
|
||||
</text>
|
||||
<group_list
|
||||
allow_select="true"
|
||||
|
|
|
|||
Loading…
Reference in New Issue