summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorymodel.cpp3
-rw-r--r--indra/newview/llinventoryobserver.cpp65
2 files changed, 34 insertions, 34 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 8583cca103..01bf7b3270 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3546,6 +3546,9 @@ void LLInventoryModel::processUpdateCreateInventoryItem(LLMessageSystem* msg, vo
gInventoryCallbacks.fire(callback_id, item_id);
+ // Message system at the moment doesn't support Thumbnails and potential
+ // newer features so just rerequest whole item
+ //
// todo: instead of unpacking message fully,
// grab only an item_id, then fetch
LLInventoryModelBackgroundFetch::instance().scheduleItemFetch(item_id, true);
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 655bdfca6b..71c81e9352 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -337,51 +337,48 @@ void LLInventoryFetchItemsObserver::startFetch()
{
for (requests_by_folders_t::value_type &folder : requests)
{
- if (folder.second.size() > MAX_INDIVIDUAL_ITEM_REQUESTS)
+ LLViewerInventoryCategory* cat = gInventory.getCategory(folder.first);
+ if (cat)
{
- // requesting one by one will take a while
- // do whole folder
- LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true);
- }
- else
- {
- LLViewerInventoryCategory* cat = gInventory.getCategory(folder.first);
- if (cat)
+ if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
- if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
- {
- // start fetching whole folder since it's not ready either way
- cat->fetch();
- }
- else if (cat->getViewerDescendentCount() <= folder.second.size()
- || cat->getDescendentCount() <= folder.second.size())
- {
- // Start fetching whole folder since we need all items
- LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true);
- }
- else
- {
- // get items one by one
- for (LLUUID &item_id : folder.second)
- {
- LLInventoryModelBackgroundFetch::getInstance()->scheduleItemFetch(item_id);
- }
- }
+ // start fetching whole folder since it's not ready either way
+ cat->fetch();
+ }
+ else if (folder.second.size() > MAX_INDIVIDUAL_ITEM_REQUESTS)
+ {
+ // requesting one by one will take a while
+ // do whole folder
+ LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true);
+ }
+ else if (cat->getViewerDescendentCount() <= folder.second.size()
+ || cat->getDescendentCount() <= folder.second.size())
+ {
+ // Start fetching whole folder since we need all items
+ LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true);
}
else
{
- // Isn't supposed to happen? We should have all folders
- // and if item exists, folder is supposed to exist as well.
- llassert(false);
- LL_WARNS("Inventory") << "Missing folder: " << folder.first << " fetching items individually" << LL_ENDL;
-
// get items one by one
- for (LLUUID &item_id : folder.second)
+ for (LLUUID& item_id : folder.second)
{
LLInventoryModelBackgroundFetch::getInstance()->scheduleItemFetch(item_id);
}
}
}
+ else
+ {
+ // Isn't supposed to happen? We should have all folders
+ // and if item exists, folder is supposed to exist as well.
+ llassert(false);
+ LL_WARNS("Inventory") << "Missing folder: " << folder.first << " fetching items individually" << LL_ENDL;
+
+ // get items one by one
+ for (LLUUID& item_id : folder.second)
+ {
+ LLInventoryModelBackgroundFetch::getInstance()->scheduleItemFetch(item_id);
+ }
+ }
}
}
else