FIRE-36144 Global online status change; Move setBOOL reset to a bit more intuitive place

Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>
master
PanteraPolnocy 2025-11-25 02:29:45 +01:00
parent 7b099b2964
commit 7308d83510
1 changed files with 7 additions and 6 deletions

View File

@ -896,13 +896,15 @@ void handleUsernameFormatOptionChanged(const LLSD& newvalue)
// <FS:Ansariel> Global online status toggle
void handleGlobalOnlineStatusChanged(const LLSD& newvalue)
{
if (!gSavedPerAccountSettings.getBOOL("GlobalOnlineStatusCurrentlyReverting"))
if (gSavedPerAccountSettings.getBOOL("GlobalOnlineStatusCurrentlyReverting"))
{
bool visible = newvalue.asBoolean();
LLSD payload;
payload["visible"] = visible;
LLNotificationsUtil::add("ConfirmGlobalOnlineStatusToggle", LLSD(), payload, applyGlobalOnlineStatusChange);
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusCurrentlyReverting", false);
return;
}
bool visible = newvalue.asBoolean();
LLSD payload;
payload["visible"] = visible;
LLNotificationsUtil::add("ConfirmGlobalOnlineStatusToggle", LLSD(), payload, applyGlobalOnlineStatusChange);
}
void applyGlobalOnlineStatusChange(const LLSD& notification, const LLSD& response)
@ -913,7 +915,6 @@ void applyGlobalOnlineStatusChange(const LLSD& notification, const LLSD& respons
{
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusCurrentlyReverting", true);
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusToggle", !visible);
gSavedPerAccountSettings.setBOOL("GlobalOnlineStatusCurrentlyReverting", false);
return;
}