From 910a5557ab7e44bf232167757c0b92de48c90b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 16 Jan 2020 17:08:01 -0500 Subject: [PATCH] Sync some code in hopes to squish Marketplace wire chewed popups A query url will no longer be built in making the request The status of marketplace will no longer get reset to uninitialized upon region change. Merchant status will no longer be requested on regions without the DD cap --- indra/newview/llmarketplacefunctions.cpp | 2 +- indra/newview/llviewermenu.cpp | 17 +++++++++++------ indra/newview/llviewermenu.h | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index b2ee4fba4..508a23229 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -1265,7 +1265,7 @@ void LLMarketplaceData::initializeSLM(const status_updated_signal_t::slot_type& } log_SLM_infos("LLHTTPClient::get", url, LLStringUtil::null); - LLHTTPClient::get(url, LLSD(), new LLSLMGetMerchantResponder); + LLHTTPClient::get(url, new LLSLMGetMerchantResponder); } void LLMarketplaceData::setDataFetchedSignal(const status_updated_signal_t::slot_type& cb) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d59bc9c6f..994a08ef3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -600,21 +600,26 @@ void set_merchant_SLM_menu() gToolBar->getChild("marketplace_listings_btn")->setEnabled(true); } -void check_merchant_status() +void check_merchant_status(bool force) { if (!gSavedSettings.getBOOL("InventoryOutboxDisplayBoth")) { - // Reset the SLM status: we actually want to check again, that's the point of calling check_merchant_status() - LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED); - + if (force) + { + // Reset the SLM status: we actually want to check again, that's the point of calling check_merchant_status() + LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED); + } // Hide SLM related menu item gMenuHolder->getChild("MarketplaceListings")->setVisible(FALSE); // Also disable the toolbar button for Marketplace Listings gToolBar->getChild("marketplace_listings_btn")->setEnabled(false); - // Launch an SLM test connection to get the merchant status - LLMarketplaceData::instance().initializeSLM(boost::bind(&set_merchant_SLM_menu)); + if (!gAgent.getRegionCapability("DirectDelivery").empty()) + { + // Launch an SLM test connection to get the merchant status + LLMarketplaceData::instance().initializeSLM(boost::bind(&set_merchant_SLM_menu)); + } } } diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index da2c0e5a1..35aa88984 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -90,7 +90,7 @@ BOOL enable_god_full(void* user_data); BOOL enable_god_liaison(void* user_data); BOOL enable_god_basic(void* user_data); void set_underclothes_menu_options(); -void check_merchant_status(); +void check_merchant_status(bool force = false); void exchange_callingcard(const LLUUID& dest_id);