SL-19533 Special COF handling #3

master
Andrey Kleshchev 2023-04-25 13:51:23 +03:00
parent 8166a8d8d4
commit c1a3c7b239
1 changed files with 5 additions and 2 deletions

View File

@ -4563,13 +4563,16 @@ protected:
void callAfterCOFFetch(nullary_func_t cb)
{
if (AISAPI::isAvailable())
LLUUID cat_id = LLAppearanceMgr::instance().getCOF();
LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN && AISAPI::isAvailable())
{
// Assume that we have no relevant cache. Fetch cof, and items cof's links point to.
AISAPI::FetchCOF([cb](const LLUUID& id) { cb(); });
}
else
{
LLUUID cat_id = LLAppearanceMgr::instance().getCOF();
// Assume that cache is present. Process like a normal folder.
callAfterCategoryFetch(cat_id, cb);
}
}