summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-25 00:03:42 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-25 00:04:05 +0300
commit4c3a7b106429f3ede827fd28acd25cc00fcb8649 (patch)
treeb12f63d47ce5dfc9c441c07a272572ab187e1519
parente7a1ac5db84c6ec77053e5115c997236ae6bf0df (diff)
SL-19503 Fix thumbnails not being restored from cache
-rw-r--r--indra/llinventory/llinventory.cpp4
-rw-r--r--indra/newview/llinventorymodel.cpp10
2 files changed, 6 insertions, 8 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 81ace2a5a8..ecd070236f 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1345,16 +1345,16 @@ bool LLInventoryCategory::importLLSD(const LLSD& cat_data)
{
setPreferredType(LLFolderType::lookup(cat_data[INV_PREFERRED_TYPE_LABEL].asString()));
}
- LLUUID thumbnail_uuid;
if (cat_data.has(INV_THUMBNAIL_LABEL))
{
+ LLUUID thumbnail_uuid;
const LLSD &thumbnail_data = cat_data[INV_THUMBNAIL_LABEL];
if (thumbnail_data.has(INV_ASSET_ID_LABEL))
{
thumbnail_uuid = thumbnail_data[INV_ASSET_ID_LABEL].asUUID();
}
+ setThumbnailUUID(thumbnail_uuid);
}
- setThumbnailUUID(thumbnail_uuid);
if (cat_data.has(INV_NAME_LABEL))
{
mName = cat_data[INV_NAME_LABEL].asString();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 32acd0eb03..873d3e1ccf 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2638,12 +2638,6 @@ bool LLInventoryModel::loadSkeleton(
cat->setUUID(folder_id.asUUID());
cat->setParent(parent_id.asUUID());
- LLSD thumbnail = (*it)["thumbnail"];
- if (thumbnail.isMap())
- {
- cat->setThumbnailUUID(thumbnail["asset_id"].asUUID());
- }
-
LLFolderType::EType preferred_type = LLFolderType::FT_NONE;
LLSD type_default = (*it)["type_default"];
if(type_default.isDefined())
@@ -2735,6 +2729,10 @@ bool LLInventoryModel::loadSkeleton(
else
{
cached_ids.insert(tcat->getUUID());
+
+ // At the moment download does not provide a thumbnail
+ // uuid, use the one from cache
+ tcat->setThumbnailUUID(cat->getThumbnailUUID());
}
}