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?
Kadah_Coba 2012-02-21 16:23:26 -08:00
parent 2a1a19e84f
commit 2c7eb83d6f
1 changed files with 11 additions and 5 deletions

View File

@ -322,6 +322,8 @@ void FSPanelProfile::onOpen(const LLSD& key)
}
getChild<LLTextBase>("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<FSDropTarget> ("drop_target");
@ -336,9 +340,6 @@ void FSPanelProfile::onOpen(const LLSD& key)
getChild<LLUICtrl>("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);
}
}
}