FIRE-23476: Don't select inventory offer in inventory under AutoAcceptNewInventory && !ShowInInventory && ShowNewInventory condition
parent
1b46b3acad
commit
69dadde429
|
|
@ -438,7 +438,7 @@ void inventory_offer_handler(LLOfferInfo* info)
|
|||
itemp = (LLViewerInventoryItem*)gInventory.getItem(info->mObjectID);
|
||||
}
|
||||
|
||||
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(info->mObjectID, info->mFromName);
|
||||
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(info->mObjectID, info->mFromName, false);
|
||||
open_agent_offer->startFetch();
|
||||
if(catp || (itemp && itemp->isFinished()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1539,7 +1539,7 @@ bool check_asset_previewable(const LLAssetType::EType asset_type)
|
|||
|
||||
// <FS:Ansariel> FIRE-15886
|
||||
//void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)
|
||||
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name, bool from_agent /* = false*/)
|
||||
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name, bool from_agent_manual /* = false*/)
|
||||
{
|
||||
for (uuid_vec_t::const_iterator obj_iter = objects.begin();
|
||||
obj_iter != objects.end();
|
||||
|
|
@ -1659,7 +1659,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
|
|||
// Highlight item
|
||||
// <FS:Ansariel> Only show if either ShowInInventory is true OR it is an inventory
|
||||
// offer from an agent and the asset is not previewable
|
||||
const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") || (from_agent && !check_asset_previewable(asset_type));
|
||||
const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") || (from_agent_manual && !check_asset_previewable(asset_type));
|
||||
//gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
|
||||
//!from_name.empty(); // don't open if it's not from anyone.
|
||||
// <FS:Ansariel> Don't mess with open inventory panels when ShowInInventory is FALSE
|
||||
|
|
@ -1973,7 +1973,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
|||
// ShowNewInventory that is actually changable by the user!
|
||||
//if (gSavedSettings.getBOOL("ShowOfferedInventory"))
|
||||
{
|
||||
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
|
||||
// <FS:Ansariel> FIRE-23476: Don't select inventory offer in inventory if AutoAcceptNewInventory && !ShowInInventory && ShowNewInventory
|
||||
//LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
|
||||
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string, true);
|
||||
// </FS:Ansariel>
|
||||
open_agent_offer->startFetch();
|
||||
if(catp || (itemp && itemp->isFinished()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ void process_initiate_download(LLMessageSystem* msg, void**);
|
|||
void start_new_inventory_observer();
|
||||
// <FS:Ansariel> FIRE-15886
|
||||
//void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name);
|
||||
void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name, bool from_agent = false);
|
||||
void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name, bool from_agent_manual = false);
|
||||
|
||||
// Returns true if item is not in certain "quiet" folder which don't need UI
|
||||
// notification (e.g. trash, cof, lost-and-found) and agent is not AFK, false otherwise.
|
||||
|
|
@ -297,9 +297,11 @@ class LLOpenAgentOffer : public LLInventoryFetchItemsObserver
|
|||
{
|
||||
public:
|
||||
LLOpenAgentOffer(const LLUUID& object_id,
|
||||
const std::string& from_name) :
|
||||
const std::string& from_name,
|
||||
bool is_manuelly_accepted) :
|
||||
LLInventoryFetchItemsObserver(object_id),
|
||||
mFromName(from_name) {}
|
||||
mFromName(from_name),
|
||||
mIsManuallyAccepted(is_manuelly_accepted) {}
|
||||
/*virtual*/ void startFetch()
|
||||
{
|
||||
for (uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it)
|
||||
|
|
@ -318,12 +320,13 @@ public:
|
|||
// This only gets called if the user explicity clicks "Show" or
|
||||
// AutoAcceptNewInventory and ShowNewInventory are TRUE.
|
||||
//open_inventory_offer(mComplete, mFromName);
|
||||
open_inventory_offer(mComplete, mFromName, true);
|
||||
open_inventory_offer(mComplete, mFromName, mIsManuallyAccepted);
|
||||
gInventory.removeObserver(this);
|
||||
delete this;
|
||||
}
|
||||
private:
|
||||
std::string mFromName;
|
||||
std::string mFromName;
|
||||
bool mIsManuallyAccepted;
|
||||
};
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue