From 728a91b288c88131db032db687a3e6f0e0a09301 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 29 Nov 2023 22:33:59 +0200 Subject: SL-20181 Use back-of compatible fetch If fetch failed for some reason, old version would cause excessive rerequests. --- indra/newview/llinventorybridge.cpp | 7 +++++-- indra/newview/llviewerinventory.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index de987d2dbd..ff92af32ff 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2284,8 +2284,11 @@ BOOL LLFolderBridge::isItemMovable() const void LLFolderBridge::selectItem() { - // Have no fear: the first thing start() does is to test if everything for that folder has been fetched... - LLInventoryModelBackgroundFetch::instance().start(getUUID(), true); + LLViewerInventoryCategory* cat = gInventory.getCategory(getUUID()); + if (cat) + { + cat->fetch(); + } } void LLFolderBridge::buildDisplayName() const diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 6d5049347f..a976cdc06d 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -664,7 +664,7 @@ bool LLViewerInventoryCategory::fetch(S32 expiry_seconds) } else { - LL_WARNS(LOG_INV) << "agent region is null" << LL_ENDL; + LL_WARNS_ONCE(LOG_INV) << "agent region is null" << LL_ENDL; } if (!url.empty() || AISAPI::isAvailable()) { -- cgit v1.2.3