diff options
author | Richard Linden <none@none> | 2010-08-19 13:24:37 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-08-19 13:24:37 -0700 |
commit | af108e324ae45ba3a055e7b55bea3f3b03c7f48d (patch) | |
tree | c5d8904d43903f77136ff9942f92146898deb37f /indra/newview/llviewermessage.cpp | |
parent | f17e3a6eb42f0f30b8d7a178cd9214a26162dde6 (diff) |
DEV-52669 FIX Inventory notification not given if first item comes from buying contents
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 067c0f3a80..71dff61f41 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -937,6 +937,15 @@ protected: //one global instance to bind them LLOpenTaskOffer* gNewInventoryObserver=NULL; +class LLNewInventoryHintObserver : public LLInventoryAddedObserver +{ +protected: + /*virtual*/ void done() + { + LLFirstUse::newInventory(); + } +}; + void start_new_inventory_observer() { if (!gNewInventoryObserver) //task offer observer @@ -952,6 +961,8 @@ void start_new_inventory_observer() gInventoryMoveObserver = new LLViewerInventoryMoveFromWorldObserver; gInventory.addObserver(gInventoryMoveObserver); } + + gInventory.addObserver(new LLNewInventoryHintObserver()); } class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver @@ -1080,7 +1091,6 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name) { - LLFirstUse::inventoryOffer(); for (uuid_vec_t::const_iterator obj_iter = objects.begin(); obj_iter != objects.end(); ++obj_iter) @@ -1765,8 +1775,6 @@ void inventory_offer_handler(LLOfferInfo* info) return; } - LLFirstUse::inventoryOffer(); - // Avoid the Accept/Discard dialog if the user so desires. JC if (gSavedSettings.getBOOL("AutoAcceptNewInventory") && (info->mType == LLAssetType::AT_NOTECARD |