From f617ae2df77defc50df5bc3f2397d2a82f0d9ffa Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Tue, 20 Sep 2022 00:24:04 +0200 Subject: [PATCH] Swap block/unblock buttons in the profile properly --- indra/newview/llpanelprofile.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 1823d55319..493951c1ff 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -1816,7 +1816,12 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata) } else if (item_name == "toggle_block_agent") { - LLAvatarActions::toggleBlock(agent_id); + Swap block/unblock buttons properly + // LLAvatarActions::toggleBlock(agent_id); + bool is_blocked = LLAvatarActions::toggleBlock(agent_id); + mBlockButton->setVisible(!is_blocked); + mUnblockButton->setVisible(is_blocked); + // } else if (item_name == "copy_user_id") {