summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-01-03 00:38:57 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-01-03 00:38:57 +0200
commit096156d16ce0461c173b1bd925a97e7c41a042e5 (patch)
treef7b852371eb89d23ebbcb6ac16fb11ee38acaf21 /indra/newview
parent7838c14d871529b39e0fdf63088ac7640478605c (diff)
SL-18058 Post-merge functionality restore #2
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llavatariconctrl.cpp22
-rw-r--r--indra/newview/llpanelprofile.cpp2
2 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index a48fbf31a6..52bec5d434 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -299,7 +299,13 @@ bool LLAvatarIconCtrl::updateFromCache()
//virtual
void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
{
- if (APT_PROPERTIES_LEGACY == type)
+ // Both APT_PROPERTIES_LEGACY and APT_PROPERTIES have icon data.
+ // 'Legacy' is cheaper to request so LLAvatarIconCtrl issues that,
+ // but own icon should track any source for the sake of timely updates.
+ //
+ // If this needs to change, make sure to update onCommitProfileImage
+ // to issue right kind of request
+ if (APT_PROPERTIES_LEGACY == type)
{
LLAvatarLegacyData* avatar_data = static_cast<LLAvatarLegacyData*>(data);
if (avatar_data)
@@ -313,6 +319,20 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
updateFromCache();
}
}
+ else if (APT_PROPERTIES == type)
+ {
+ LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
+ if (avatar_data)
+ {
+ if (avatar_data->avatar_id != mAvatarId)
+ {
+ return;
+ }
+
+ LLAvatarIconIDCache::getInstance()->add(mAvatarId, avatar_data->image_id);
+ updateFromCache();
+ }
+ }
}
void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index f014dff470..55ddeed4ec 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1806,7 +1806,7 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id)
if (result)
{
LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
- // Should trigger callbacks in icon controls
+ // Should trigger callbacks in icon controls (or request Legacy)
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
}
};