summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmaininventory.cpp30
-rw-r--r--indra/newview/llpanelmaininventory.h8
2 files changed, 31 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;
}
}
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index d28daddd73..21100cc03c 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -182,6 +182,13 @@ protected:
LLSidepanelInventory* getParentSidepanelInventory();
private:
+ enum class EFetchState
+ {
+ Unknown,
+ Fetching,
+ Complete
+ };
+
LLFloaterInventoryFinder* getFinder();
LLFilterEditor* mFilterEditor;
@@ -202,6 +209,7 @@ private:
S32 mCategoryCount = 0;
std::string mCategoryCountString;
LLComboBox* mSearchTypeCombo;
+ EFetchState mLastFetchState{ EFetchState::Unknown };
LLButton* mBackBtn;
LLButton* mForwardBtn;