diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-12-18 06:33:57 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-12-18 06:33:57 +0200 |
| commit | aed6313d7c755ae1b980074fc27dfd98267fca24 (patch) | |
| tree | bce1767cdba0a920eac80bc2c78c71bbc9899e15 /indra/newview/llinventoryobserver.cpp | |
| parent | a069a21d318abd4eded46556c3252fec08eea84c (diff) | |
| parent | a592292242e29d0379ee72572a434359e1e892d1 (diff) | |
Merge branch 'main' into DRTVWR-594-maint-Y
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
| -rw-r--r-- | indra/newview/llinventoryobserver.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 71c81e9352..b0617e5b6c 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -417,10 +417,22 @@ void LLInventoryFetchDescendentsObserver::changed(U32 mask) } ++it; } - if (mIncomplete.empty()) - { - done(); - } + + if (mIncomplete.empty()) + { + done(); + } + else + { + LLInventoryModelBackgroundFetch* fetcher = LLInventoryModelBackgroundFetch::getInstance(); + if (fetcher->isEverythingFetched() + && !fetcher->folderFetchActive()) + { + // If fetcher is done with folders yet we are waiting, fetch either + // failed or version is somehow stuck at -1 + done(); + } + } } void LLInventoryFetchDescendentsObserver::startFetch() @@ -431,12 +443,8 @@ void LLInventoryFetchDescendentsObserver::startFetch() if (!cat) continue; if (!isCategoryComplete(cat)) { - // CHECK IT: isCategoryComplete() checks both version and descendant count but - // fetch() only works for Unknown version and doesn't care about descentants, - // as result fetch won't start and folder will potentially get stuck as - // incomplete in observer. - // Likely either both should use only version or both should check descendants. - cat->fetch(); //blindly fetch it without seeing if anything else is fetching it. + //blindly fetch it without seeing if anything else is fetching it. + LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(*it, true); mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer. } else |
