summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-20 22:06:20 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-03-20 23:39:30 +0200
commitb68a67491026a055f0de9df349508b9e60a200ed (patch)
tree546a35d7a8c8be76150be477b128acae6107811f /indra/newview/llinventorymodel.cpp
parent72131418aa943b93f61508993d7006b02ebd9c35 (diff)
SL-18629 Load cof only once links are ready
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index b82f0c3ede..b833571ee9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -440,7 +440,7 @@ LLInventoryModel::LLInventoryModel()
mIsNotifyObservers(FALSE),
mModifyMask(LLInventoryObserver::ALL),
mChangedItemIDs(),
- mBulckFecthCallbackSlot(),
+ mBulkFecthCallbackSlot(),
mObservers(),
mHttpRequestFG(NULL),
mHttpRequestBG(NULL),
@@ -473,9 +473,9 @@ void LLInventoryModel::cleanupInventory()
delete observer;
}
- if (mBulckFecthCallbackSlot.connected())
+ if (mBulkFecthCallbackSlot.connected())
{
- mBulckFecthCallbackSlot.disconnect();
+ mBulkFecthCallbackSlot.disconnect();
}
mObservers.clear();
@@ -1764,6 +1764,7 @@ void LLInventoryModel::rebuildBrockenLinks()
addChangedMask(LLInventoryObserver::REBUILD, link_id);
}
mPossiblyBrockenLinks.clear();
+ notifyObservers();
}
// Does not appear to be used currently.
@@ -2389,16 +2390,17 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
// isEverythingFetched is actually 'initial' fetch only.
// Schedule this link for a recheck once inventory gets loaded
mPossiblyBrockenLinks.insert(item->getUUID());
- if (!mBulckFecthCallbackSlot.connected())
+ if (!mBulkFecthCallbackSlot.connected())
{
// Links might take a while to update this way, and there
// might be a lot of them. A better option might be to check
// links periodically with final check on fetch completion.
- mBulckFecthCallbackSlot =
+ mBulkFecthCallbackSlot =
LLInventoryModelBackgroundFetch::getInstance()->setAllFoldersFetchedCallback(
- []()
+ [this]()
{
- gInventory.rebuildBrockenLinks();
+ rebuildBrockenLinks();
+ mBulkFecthCallbackSlot.disconnect();
});
}
LL_DEBUGS(LOG_INV) << "Scheduling a link to be rebuilt later [ name: " << item->getName()