SL-12121 FIXED Unable to delete folders from 'Marketplace listings'

Mnikolenko Productengine 2019-10-17 19:15:02 +03:00
parent 96c78187c1
commit aab8ea7236
3 changed files with 14 additions and 2 deletions

View File

@ -2270,7 +2270,7 @@ public:
// Can be destroyed (or moved to trash)
BOOL LLFolderBridge::isItemRemovable() const
{
if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder())
if (!get_is_category_removable(getInventoryModel(), mUUID))
{
return FALSE;
}
@ -2287,6 +2287,11 @@ BOOL LLFolderBridge::isItemRemovable() const
}
}
if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID)))
{
return FALSE;
}
return TRUE;
}

View File

@ -1294,6 +1294,11 @@ void LLMarketplaceData::setSLMDataFetched(U32 status)
}
}
bool LLMarketplaceData::isSLMDataFetched()
{
return mMarketPlaceDataFetched == MarketplaceFetchCodes::MARKET_FETCH_DONE;
}
// Creation / Deletion / Update
// Methods publicly called
bool LLMarketplaceData::createListing(const LLUUID& folder_id)

View File

@ -204,7 +204,9 @@ public:
void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb);
void setSLMDataFetched(U32 status);
U32 getSLMDataFetched() { return mMarketPlaceDataFetched; }
bool isSLMDataFetched();
// High level create/delete/set Marketplace data: each method returns true if the function succeeds, false if error
bool createListing(const LLUUID& folder_id);
bool activateListing(const LLUUID& folder_id, bool activate, S32 depth = -1);