From c1a3c7b239dcde347403c818d4ad1eeedf45d280 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Apr 2023 13:51:23 +0300 Subject: SL-19533 Special COF handling #3 --- indra/newview/llappearancemgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 297403fc6c..d79525ec62 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -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); } } -- cgit v1.2.3