From 9745a0a9e4fab00da010793994c6d50e42635ebe Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 17 Jun 2010 17:03:05 +0300 Subject: EXT-7777 WIP Added several cases to show Loading indicator in "My Outfits:" * Outfit is loading for the first time * After user clicks: ** Item Context menu > Add ** Item Context menu > Replace Known Issues: 1. For multi-wearable indicator will disappear after first item from the batch is worn. Did not fix this to not affect the stability before 2.1 release. 2. To show loading indicator first time we have to notify subscribers of LLAgentWearables. For now this is done from the deprecated LLAgentWearables::processAgentInitialWearablesUpdate Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/602/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 7 ++++++- indra/newview/llappearancemgr.cpp | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 05ed6ec350..3923749e64 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -921,13 +921,18 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const // static // ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume // that viewers have a Current Outfit Folder and won't need this message, and thus -// we can remove/ignore this whole function. +// we can remove/ignore this whole function. EXCEPT gAgentWearables.notifyLoadingStarted void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data) { // We should only receive this message a single time. Ignore subsequent AgentWearablesUpdates // that may result from AgentWearablesRequest having been sent more than once. if (mInitialWearablesUpdateReceived) return; + + // notify subscribers that wearables started loading. See EXT-7777 + // *TODO: find more proper place to not be called from deprecated method. + gAgentWearables.notifyLoadingStarted(); + mInitialWearablesUpdateReceived = true; LLUUID agent_id; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 52a5587a16..be58a562c0 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -923,6 +923,14 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up { if (item_id_to_wear.isNull()) return false; + // *TODO: issue with multi-wearable should be fixed: + // in this case this method will be called N times - loading started for each item + // and than N times will be called - loading completed for each item. + // That means subscribers will be notified that loading is done after first item in a batch is worn. + // (loading indicator disappears for example before all selected items are worn) + // Have not fix this issue for 2.1 because of stability reason. EXT-7777. + gAgentWearables.notifyLoadingStarted(); + LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear); if (!item_to_wear) return false; -- cgit v1.2.3