From dc19e9f1812c535f076e8ede528d148a79dc49cf Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 11 Apr 2014 13:22:08 +0200 Subject: [PATCH] FIRE-10489: Fixed wrong enabled state of voice call button in IM floater if friend state changes --- indra/newview/fsfloaterim.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 629760346b..dd3bf18173 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -592,12 +592,19 @@ void FSFloaterIM::updateButtons(bool is_call_started) void FSFloaterIM::changed(U32 mask) { LL_DEBUGS("FSFloaterIM") << "FSFloaterIM::changed(U32 mask)" << LL_ENDL; - getChild("call_btn")->setEnabled(!LLAvatarActions::isFriend(mOtherParticipantUUID)); - // Disable "Teleport" button if friend is offline if(LLAvatarActions::isFriend(mOtherParticipantUUID)) { - getChild("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID)); + bool is_online = LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID); + getChild("teleport_btn")->setEnabled(is_online); + getChild("call_btn")->setEnabled(is_online); + } + else + { + // If friendship dissolved, enable buttons by default because we don't + // know about their online status anymore + getChild("teleport_btn")->setEnabled(TRUE); + getChild("call_btn")->setEnabled(TRUE); } }