FIRE-36144 Add confirmation for global online status change
I considered using a local variable instead of a debug setting, but in the end I decided not to clutter the header file any further just to satisfy a function that's used once in a blue moon Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>master
parent
7aa8bbe9cf
commit
af7d4d8b27
|
|
@ -365,6 +365,19 @@
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>GlobalOnlineStatusCurrentlyReverting</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Flag to prevent infinite loop when reverting the setting on cancel</string>
|
||||||
|
<key>HideFromEditor</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
<key>InstantMessageLogPath</key>
|
<key>InstantMessageLogPath</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
|
||||||
|
|
@ -896,7 +896,26 @@ void handleUsernameFormatOptionChanged(const LLSD& newvalue)
|
||||||
// <FS:Ansariel> Global online status toggle
|
// <FS:Ansariel> Global online status toggle
|
||||||
void handleGlobalOnlineStatusChanged(const LLSD& newvalue)
|
void handleGlobalOnlineStatusChanged(const LLSD& newvalue)
|
||||||
{
|
{
|
||||||
|
if (!gSavedPerAccountSettings.getBOOL("GlobalOnlineStatusCurrentlyReverting"))
|
||||||
|
{
|
||||||
bool visible = newvalue.asBoolean();
|
bool visible = newvalue.asBoolean();
|
||||||
|
LLSD payload;
|
||||||
|
payload["visible"] = visible;
|
||||||
|
LLNotificationsUtil::add("ConfirmGlobalOnlineStatusToggle", LLSD(), payload, applyGlobalOnlineStatusChange);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void applyGlobalOnlineStatusChange(const LLSD& notification, const LLSD& response)
|
||||||
|
{
|
||||||
|
bool visible = notification["payload"]["visible"].asBoolean();
|
||||||
|
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||||
|
if (option != 0)
|
||||||
|
{
|
||||||
|
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusCurrentlyReverting", true);
|
||||||
|
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusToggle", !visible);
|
||||||
|
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusCurrentlyReverting", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LLAvatarTracker::buddy_map_t all_buddies;
|
LLAvatarTracker::buddy_map_t all_buddies;
|
||||||
LLAvatarTracker::instance().copyBuddyList(all_buddies);
|
LLAvatarTracker::instance().copyBuddyList(all_buddies);
|
||||||
|
|
|
||||||
|
|
@ -61,4 +61,8 @@ extern LLControlGroup gCrashSettings;
|
||||||
// Set after settings loaded
|
// Set after settings loaded
|
||||||
extern std::string gLastRunVersion;
|
extern std::string gLastRunVersion;
|
||||||
|
|
||||||
|
// <FS> Global online status toggle
|
||||||
|
void applyGlobalOnlineStatusChange(const LLSD& notification, const LLSD& response);
|
||||||
|
// </FS>
|
||||||
|
|
||||||
#endif // LL_LLVIEWERCONTROL_H
|
#endif // LL_LLVIEWERCONTROL_H
|
||||||
|
|
|
||||||
|
|
@ -14128,6 +14128,19 @@ the region "[REGION]"?
|
||||||
name="okbutton"
|
name="okbutton"
|
||||||
yestext="OK"/>
|
yestext="OK"/>
|
||||||
</notification>
|
</notification>
|
||||||
|
<notification
|
||||||
|
icon="alertmodal.tga"
|
||||||
|
name="ConfirmGlobalOnlineStatusToggle"
|
||||||
|
type="alertmodal">
|
||||||
|
Are you sure you want to change your online status visibility for all friends at once?
|
||||||
|
|
||||||
|
Due to server load, this mass change can take a while to become effective and may cause temporary issues for some friends seeing your online status.
|
||||||
|
<tag>confirm</tag>
|
||||||
|
<usetemplate
|
||||||
|
name="okcancelbuttons"
|
||||||
|
notext="Cancel"
|
||||||
|
yestext="OK"/>
|
||||||
|
</notification>
|
||||||
<notification
|
<notification
|
||||||
icon="alertmodal.tga"
|
icon="alertmodal.tga"
|
||||||
name="GlobalOnlineStatusToggle"
|
name="GlobalOnlineStatusToggle"
|
||||||
|
|
|
||||||
|
|
@ -5280,6 +5280,12 @@ Czy chcesz autoryzować [APP_NAME] do przesyłania zdjęć na Flickr?
|
||||||
<notification name="PickLimitReached">
|
<notification name="PickLimitReached">
|
||||||
Nie można utworzyć kolejnego Miejsca, ponieważ limit ich ilości został osiągnięty.
|
Nie można utworzyć kolejnego Miejsca, ponieważ limit ich ilości został osiągnięty.
|
||||||
</notification>
|
</notification>
|
||||||
|
<notification name="ConfirmGlobalOnlineStatusToggle">
|
||||||
|
Czy na pewno chcesz zmienić widoczność swojego statusu online dla wszystkich znajomych naraz?
|
||||||
|
|
||||||
|
Ze względu na obciążenie serwera taka masowa zmiana może chwilę potrwać i tymczasowo powodować problemy z wyświetlaniem Twojego statusu online u niektórych znajomych.
|
||||||
|
<usetemplate name="okcancelbuttons" notext="Anuluj" />
|
||||||
|
</notification>
|
||||||
<notification name="GlobalOnlineStatusToggle">
|
<notification name="GlobalOnlineStatusToggle">
|
||||||
Ze względu na obciążenie serwera masowa zmiana widoczności online może zająć trochę czasu. Prosimy o cierpliwość.
|
Ze względu na obciążenie serwera masowa zmiana widoczności online może zająć trochę czasu. Prosimy o cierpliwość.
|
||||||
<usetemplate ignoretext="Informuj mnie, że masowa zmiana widoczności online może zająć trochę czasu" name="okignore" />
|
<usetemplate ignoretext="Informuj mnie, że masowa zmiana widoczności online może zająć trochę czasu" name="okignore" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue