From 2c7eb83d6f10f074347add73e9e33738796ee927 Mon Sep 17 00:00:00 2001 From: Kadah_Coba Date: Tue, 21 Feb 2012 16:23:26 -0800 Subject: [PATCH] LP: FIRE-5178 - Do not show own online status on own profile If the agent is offline, it wouldn't load anyway, so whats the point? --- indra/newview/fspanelprofile.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp index 93997707b2..de3dbe92c5 100644 --- a/indra/newview/fspanelprofile.cpp +++ b/indra/newview/fspanelprofile.cpp @@ -322,6 +322,8 @@ void FSPanelProfile::onOpen(const LLSD& key) } getChild("sl_description_edit")->setParseHTML(false); + + updateButtons(); } else { @@ -329,6 +331,8 @@ void FSPanelProfile::onOpen(const LLSD& key) getChildView("add_friend")->setEnabled(!LLAvatarActions::isFriend(getAvatarId())); mVoiceStatus = LLAvatarActions::canCall(); + + updateOnlineStatus(); //will also call updateButtons() } FSDropTarget* target = getChild ("drop_target"); @@ -336,9 +340,6 @@ void FSPanelProfile::onOpen(const LLSD& key) getChild("user_key")->setValue( getAvatarId().asString() ); - updateOnlineStatus(); - updateButtons(); - updateData(); } @@ -389,7 +390,7 @@ void FSPanelProfile::processProperties(void* data, EAvatarProcessorType type) void FSPanelProfile::processProfileProperties(const LLAvatarData* avatar_data) { - if (!LLAvatarActions::isFriend(getAvatarId())) + if (!LLAvatarActions::isFriend(getAvatarId()) && (getAvatarId() != gAgent.getID())) { // this is non-friend avatar. Status will be updated from LLAvatarPropertiesProcessor. // in FSPanelProfile::processOnlineStatus() @@ -678,8 +679,13 @@ void FSPanelProfile::setAvatarId(const LLUUID& id) { LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this); } + FSPanelProfileTab::setAvatarId(id); - LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this); + + if (LLAvatarActions::isFriend(getAvatarId())) + { + LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this); + } } }