diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-03 00:38:57 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-03 00:38:57 +0200 |
| commit | 096156d16ce0461c173b1bd925a97e7c41a042e5 (patch) | |
| tree | f7b852371eb89d23ebbcb6ac16fb11ee38acaf21 /indra/newview/llavatariconctrl.cpp | |
| parent | 7838c14d871529b39e0fdf63088ac7640478605c (diff) | |
SL-18058 Post-merge functionality restore #2
Diffstat (limited to 'indra/newview/llavatariconctrl.cpp')
| -rw-r--r-- | indra/newview/llavatariconctrl.cpp | 22 |
1 files changed, 21 insertions, 1 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) |
