summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-06-20 20:27:30 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-06-20 20:33:13 +0300
commit0c852a025969437798e14c8c6c22c74246e091a0 (patch)
treec0b92f6c662db430d4acb7fa68489614b16e685f /indra/newview
parent750606c7a5ddf5cb8e46609d5715b8892e20d09f (diff)
SL-14181 Classifieds show 'loading' despite all data being ready after deleting a classified
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelprofileclassifieds.cpp24
-rw-r--r--indra/newview/llpanelprofilepicks.cpp22
2 files changed, 22 insertions, 24 deletions
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index 1cfe0b0a2b..a8b29313c9 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -364,20 +364,20 @@ void LLPanelProfileClassifieds::processProperties(void* data, EAvatarProcessorTy
}
}
- BOOL no_data = !mTabContainer->getTabCount();
- mNoItemsLabel->setVisible(no_data);
- if (no_data)
+ // set even if not visible, user might delete own
+ // calassified and this string will need to be shown
+ if (getSelfProfile())
{
- if(getSelfProfile())
- {
- mNoItemsLabel->setValue(LLTrans::getString("NoClassifiedsText"));
- }
- else
- {
- mNoItemsLabel->setValue(LLTrans::getString("NoAvatarClassifiedsText"));
- }
+ mNoItemsLabel->setValue(LLTrans::getString("NoClassifiedsText"));
}
- else if (selected_id.isNull())
+ else
+ {
+ mNoItemsLabel->setValue(LLTrans::getString("NoAvatarClassifiedsText"));
+ }
+
+ bool has_data = mTabContainer->getTabCount() > 0;
+ mNoItemsLabel->setVisible(!has_data);
+ if (has_data && selected_id.isNull())
{
mTabContainer->selectFirstTab();
}
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 4b2d32ac60..8896c3d238 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -342,20 +342,18 @@ void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks)
mSheduledPickCreation.clear();
- BOOL no_data = !mTabContainer->getTabCount();
- mNoItemsLabel->setVisible(no_data);
- if (no_data)
+ if (getSelfProfile())
{
- if (getSelfProfile())
- {
- mNoItemsLabel->setValue(LLTrans::getString("NoPicksText"));
- }
- else
- {
- mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksText"));
- }
+ mNoItemsLabel->setValue(LLTrans::getString("NoPicksText"));
}
- else if (!has_selection)
+ else
+ {
+ mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksText"));
+ }
+
+ bool has_data = mTabContainer->getTabCount() > 0;
+ mNoItemsLabel->setVisible(!has_data);
+ if (has_data && !has_selection)
{
mTabContainer->selectFirstTab();
}