summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-28 02:27:34 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-28 02:27:34 +0300
commit89a8c96f36983738645a2116d9d432e3bd88f1df (patch)
treeaee7e09b84cea064c1ed2be1baed6049311d18ab /indra/newview/llinventorymodel.cpp
parent110ed8f4d3152c91ddd7577234ad37b666be86c9 (diff)
SL-18003 Bulk download items when possible
And signal fodler fetch completion when folder of recursive fetch is done, do not hold it for individual items
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 47fd17ef86..bfc7840708 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1762,7 +1762,7 @@ void LLInventoryModel::rebuildBrockenLinks()
// make sure we aren't adding expensive Rebuild to anything else.
notifyObservers();
- for (LLUUID link_id : mPossiblyBrockenLinks)
+ for (const LLUUID &link_id : mPossiblyBrockenLinks)
{
addChangedMask(LLInventoryObserver::REBUILD, link_id);
}
@@ -2388,7 +2388,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
// The item will show up as a broken link.
if (item->getIsBrokenLink())
{
- if (!LLInventoryModelBackgroundFetch::getInstance()->isEverythingFetched())
+ if (LLInventoryModelBackgroundFetch::getInstance()->folderFetchActive())
{
// isEverythingFetched is actually 'initial' fetch only.
// Schedule this link for a recheck once inventory gets loaded
@@ -2399,7 +2399,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
// might be a lot of them. A better option might be to check
// links periodically with final check on fetch completion.
mBulkFecthCallbackSlot =
- LLInventoryModelBackgroundFetch::getInstance()->setAllFoldersFetchedCallback(
+ LLInventoryModelBackgroundFetch::getInstance()->setFetchCompletionCallback(
[this]()
{
rebuildBrockenLinks();
@@ -3798,7 +3798,10 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
// Temporary workaround: just fetch the item using AIS to get missing fields.
// If this works fine we might want to extract ids only from the message
// then use AIS as a primary fetcher
- LLInventoryModelBackgroundFetch::instance().start((*cit)->getUUID(), false);
+
+ // Use AIS derectly to not reset folder's version
+ // Todo: May be LLInventoryModelBackgroundFetch needs a 'forced' option
+ AISAPI::FetchCategoryChildren((*cit)->getUUID(), AISAPI::INVENTORY);
}
for (item_array_t::iterator iit = items.begin(); iit != items.end(); ++iit)
{
@@ -3807,7 +3810,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
// Temporary workaround: just fetch the item using AIS to get missing fields.
// If this works fine we might want to extract ids only from the message
// then use AIS as a primary fetcher
- LLInventoryModelBackgroundFetch::instance().start((*iit)->getUUID(), false);
+ LLInventoryModelBackgroundFetch::instance().scheduleItemFetch((*iit)->getUUID());
}
gInventory.notifyObservers();