summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewmodelinventory.cpp
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-10-20 16:39:00 -0700
committercallum_linden <none@none>2015-10-20 16:39:00 -0700
commit6599e10d00f3a47e90136f5f6cb4b2d1e02cb2e5 (patch)
treed48c683923ee978db4dbb0d66cc0d9f45233a68e /indra/newview/llfolderviewmodelinventory.cpp
parentc16e726d0e2a8c607ce441eb5bf2419b16b41cab (diff)
parent4312629e7c5749b86add9d42e6e550602f34dbf5 (diff)
Merge with tip of viewer-release
Diffstat (limited to 'indra/newview/llfolderviewmodelinventory.cpp')
-rwxr-xr-xindra/newview/llfolderviewmodelinventory.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 44eda4d6c0..e9f80b795a 100755
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -109,6 +109,29 @@ bool LLFolderViewModelInventory::contentsReady()
return !LLInventoryModelBackgroundFetch::instance().folderFetchActive();
}
+bool LLFolderViewModelInventory::isFolderComplete(LLFolderViewFolder* folder)
+{
+ LLFolderViewModelItemInventory* modelp = static_cast<LLFolderViewModelItemInventory*>(folder->getViewModelItem());
+ LLUUID cat_id = modelp->getUUID();
+ if (cat_id.isNull())
+ {
+ return false;
+ }
+ LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+ if (cat)
+ {
+ // don't need to check version - descendents_server == -1 if we have no data
+ S32 descendents_server = cat->getDescendentCount();
+ S32 descendents_actual = cat->getViewerDescendentCount();
+ if (descendents_server == descendents_actual
+ || (descendents_actual > 0 && descendents_server == -1)) // content was loaded in previous session
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
void LLFolderViewModelItemInventory::requestSort()
{
LLFolderViewModelItemCommon::requestSort();