summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2020-03-12 17:47:51 +0200
committermaxim_productengine <mnikolenko@productengine.com>2020-03-12 17:47:51 +0200
commitba3f88c86704eb4565efe7c8902a57559645eedb (patch)
treee9510a0525f90041effba928c053c8904120523a
parent6a9658a6504ac60b0a932900cb73524dc0d1f7c9 (diff)
SL-187 FIXED The experience list is unsorted the first time you open Experiences
-rw-r--r--indra/newview/llpanelexperiences.cpp13
-rw-r--r--indra/newview/llpanelexperiences.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp
index 37981b36a9..91d3b523fb 100644
--- a/indra/newview/llpanelexperiences.cpp
+++ b/indra/newview/llpanelexperiences.cpp
@@ -93,9 +93,20 @@ void LLPanelExperiences::setExperienceList( const LLSD& experiences )
item->init(public_key);
mExperiencesList->addItem(item, public_key);
+
+ const LLSD& experience_details = LLExperienceCache::instance().get(public_key);
+ if (experience_details.isUndefined())
+ {
+ LLExperienceCache::instance().get(public_key, boost::bind(&LLPanelExperiences::sortExperiencesList, this));
+ }
}
- mExperiencesList->sort();
+ sortExperiencesList();
+}
+
+void LLPanelExperiences::sortExperiencesList()
+{
+ mExperiencesList->sort();
}
void LLPanelExperiences::getExperienceIdsList(std::vector<LLUUID>& result)
diff --git a/indra/newview/llpanelexperiences.h b/indra/newview/llpanelexperiences.h
index f29fdfdecb..9d5afd1a6a 100644
--- a/indra/newview/llpanelexperiences.h
+++ b/indra/newview/llpanelexperiences.h
@@ -60,6 +60,8 @@ public:
void setExperienceList(const LLSD& experiences);
void getExperienceIdsList(std::vector<LLUUID>& result);
+ void sortExperiencesList();
+
LLExperienceItem* getSelectedExperienceItem();
void removeExperiences( const LLSD& ids );
void removeExperience( const LLUUID& id);