summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-24 18:03:09 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-24 18:03:09 +0200
commit9fa64f1e2087a8e45adad7298d2dd3661bd80e25 (patch)
treeb0f538d11083b6b1c473979f89504528a4c33914 /indra
parent9697ac1bece30bda6410a8dc33450b85a3358745 (diff)
SL-18003 Fix items not being marked as complete when fetched via ais
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llaisapi.cpp1
-rw-r--r--indra/newview/llinventoryfilter.cpp3
-rw-r--r--indra/newview/llinventorymodel.cpp6
-rw-r--r--indra/newview/llinventoryobserver.cpp2
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp8
-rw-r--r--indra/newview/llviewerinventory.h6
7 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index d0c8d38e28..d204a752ec 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -845,6 +845,7 @@ void AISUpdate::parseItem(const LLSD& item_map)
{
mItemsCreated[item_id] = new_item;
mCatDescendentDeltas[new_item->getParentUUID()];
+ new_item->setComplete(true);
}
else if (curr_item)
{
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 6e09161473..0af383f232 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -195,7 +195,8 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
// when applying a filter, matching folders get their contents downloaded first
// but make sure we are not interfering with pre-download
if (isNotDefault()
- && LLStartUp::getStartupState() > STATE_WEARABLES_WAIT)
+ && LLStartUp::getStartupState() > STATE_WEARABLES_WAIT
+ && !LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress())
{
LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id);
if (!cat || (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN))
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 56f0a68f70..4c2383d211 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3451,7 +3451,7 @@ void LLInventoryModel::processUpdateCreateInventoryItem(LLMessageSystem* msg, vo
// todo: instead of unpacking message fully,
// grab only an item_id, then fetch via AIS
- AISAPI::FetchItem(item_id, AISAPI::INVENTORY);
+ LLInventoryModelBackgroundFetch::instance().start(item_id, false);
}
}
@@ -3795,7 +3795,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
// Temporary workaround: just fetch the item using AIS to get missing fields.
// If this works fine we might want to extract ids only from the message
// then use AIS as a primary fetcher
- AISAPI::FetchCategoryChildren((*cit)->getUUID(), AISAPI::INVENTORY);
+ LLInventoryModelBackgroundFetch::instance().start((*cit)->getUUID(), false);
}
for (item_array_t::iterator iit = items.begin(); iit != items.end(); ++iit)
{
@@ -3804,7 +3804,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
// Temporary workaround: just fetch the item using AIS to get missing fields.
// If this works fine we might want to extract ids only from the message
// then use AIS as a primary fetcher
- AISAPI::FetchItem((*iit)->getUUID(), AISAPI::INVENTORY);
+ LLInventoryModelBackgroundFetch::instance().start((*iit)->getUUID(), false);
}
gInventory.notifyObservers();
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 809fbe4100..25f1854765 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -310,7 +310,7 @@ void LLInventoryFetchItemsObserver::startFetch()
}
// Todo: remove item from mIncomplete on callback
// but keep in mind that observer can expire before
- // callback
+ // callback or use LLInventoryModelBackgroundFetch
}
else
{
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 9660fa5916..48e610a135 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -280,7 +280,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
}
// do not enable the UI for incomplete items.
- BOOL is_complete = item->isFinished();
+ bool is_complete = item->isFinished();
const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
const BOOL is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 95174c75e9..d8de269c3c 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -312,7 +312,7 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLUUID& uuid,
time_t creation_date_utc) :
LLInventoryItem(uuid, parent_uuid, perm, asset_uuid, type, inv_type,
name, desc, sale_info, flags, creation_date_utc),
- mIsComplete(TRUE)
+ mIsComplete(true)
{
}
@@ -321,7 +321,7 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLUUID& item_id,
const std::string& name,
LLInventoryType::EType inv_type) :
LLInventoryItem(),
- mIsComplete(FALSE)
+ mIsComplete(false)
{
mUUID = item_id;
mParentUUID = parent_id;
@@ -331,7 +331,7 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLUUID& item_id,
LLViewerInventoryItem::LLViewerInventoryItem() :
LLInventoryItem(),
- mIsComplete(FALSE)
+ mIsComplete(false)
{
}
@@ -348,7 +348,7 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other)
LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) :
LLInventoryItem(other),
- mIsComplete(TRUE)
+ mIsComplete(true)
{
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 63f163b168..1554c84137 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -135,8 +135,8 @@ public:
virtual BOOL importLegacyStream(std::istream& input_stream);
// new methods
- BOOL isFinished() const { return mIsComplete; }
- void setComplete(BOOL complete) { mIsComplete = complete; }
+ bool isFinished() const { return mIsComplete; }
+ void setComplete(bool complete) { mIsComplete = complete; }
//void updateAssetOnServer() const;
virtual void setTransactionID(const LLTransactionID& transaction_id);
@@ -164,7 +164,7 @@ public:
BOOL regenerateLink();
public:
- BOOL mIsComplete;
+ bool mIsComplete;
LLTransactionID mTransactionID;
};