summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-25 03:38:26 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-25 04:26:38 +0300
commit154ab03bf8a5dacc3128718d1f15160f0cbe2b33 (patch)
treee7e564a2e7dc27619cf98ca56f3e957d2ed4dd70 /indra/newview/llappearancemgr.cpp
parent9c2b0c709b3d1cf1a9243853a8df7089e2494057 (diff)
SL-19533 Special COF handling #2
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp33
1 files changed, 23 insertions, 10 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 9115d7e5c2..297403fc6c 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -4561,18 +4561,31 @@ protected:
nullary_func_t mCallable;
};
+void callAfterCOFFetch(nullary_func_t cb)
+{
+ if (AISAPI::isAvailable())
+ {
+ AISAPI::FetchCOF([cb](const LLUUID& id) { cb(); });
+ }
+ else
+ {
+ LLUUID cat_id = LLAppearanceMgr::instance().getCOF();
+ callAfterCategoryFetch(cat_id, cb);
+ }
+}
+
void callAfterCategoryFetch(const LLUUID& cat_id, nullary_func_t cb)
{
- CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(cat_id, cb);
- stage1->startFetch();
- if (stage1->isFinished())
- {
- stage1->done();
- }
- else
- {
- gInventory.addObserver(stage1);
- }
+ CallAfterCategoryFetchStage1* stage1 = new CallAfterCategoryFetchStage1(cat_id, cb);
+ stage1->startFetch();
+ if (stage1->isFinished())
+ {
+ stage1->done();
+ }
+ else
+ {
+ gInventory.addObserver(stage1);
+ }
}
void add_wearable_type_counts(const uuid_vec_t& ids,