summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-09-06 09:44:09 +0300
committerGitHub <noreply@github.com>2024-09-06 09:44:09 +0300
commit322b13cf95608963c93442c4d073e175f51c981a (patch)
treeb7e0f8b67004c93b372730f6e38db254501de2a7 /indra/newview/llpanelmaininventory.cpp
parent33fbcd858ff16f8e8bc9a071f0639f47b1f688ce (diff)
parent3c471b81554d9727b1a1929681ce3bfb4734aabc (diff)
Merge pull request #2516 from Ansariel/develop-inventory_item_count
Follow-up fix for 238a2a64b31e6a0b431309e363067a7fe57125ae
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 0c068ff993..143873f168 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -997,6 +997,22 @@ void LLPanelMainInventory::updateItemcountText()
mCategoryCount = gInventory.getCategoryCount();
update = true;
}
+
+ EFetchState currentFetchState{ EFetchState::Unknown };
+ if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
+ {
+ currentFetchState = EFetchState::Fetching;
+ }
+ else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched())
+ {
+ currentFetchState = EFetchState::Complete;
+ }
+
+ if (mLastFetchState != currentFetchState)
+ {
+ mLastFetchState = currentFetchState;
+ update = true;
+ }
}
if (mLastFilterText != getFilterText())
@@ -1027,17 +1043,17 @@ void LLPanelMainInventory::updateItemcountText()
}
else
{
- if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
+ switch (mLastFetchState)
{
+ case EFetchState::Fetching:
text = getString("ItemcountFetching", string_args);
- }
- else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched())
- {
+ break;
+ case EFetchState::Complete:
text = getString("ItemcountCompleted", string_args);
- }
- else
- {
+ break;
+ default:
text = getString("ItemcountUnknown", string_args);
+ break;
}
}