[DEV] try to optimize the view of metadata

This commit is contained in:
Edouard DUPIN 2017-04-26 21:23:02 +02:00
parent 256a2f22d9
commit a58076f0f7

View File

@ -135,6 +135,7 @@ void appl::widget::ListViewer::searchElementsInternal(const std::string& _filter
}
elem->m_id = it;
elem->m_metadataUpdated = false;
/*
// TODO : Type the "andThen" to simplify user experience
// TODO : Add the reference on the typed future in the function andTrn ... ==> then we can add later the cancel
@ -233,6 +234,7 @@ void appl::widget::ListViewer::searchElementsInternal(const std::string& _filter
tmpWidget->markToRedraw();
return true;
});
*/
elem->m_metadataUpdated = true;
//elem->m_thumb = remoteServiceVideo.mediaThumbGet(it, 128).wait().get();
m_listElement.push_back(elem);
@ -454,6 +456,9 @@ void appl::ElementDisplayed::generateDisplay(vec2 _startPos, vec2 _size) {
std::string textToDisplay;
if (m_property != nullptr) {
std::unique_lock<std::mutex> lock(m_property->m_mutex);
if (m_property->m_metadataUpdated == false) {
textToDisplay += "<br/><i>Loading in progress</i>";
} else {
//m_text.setClipping(drawClippingPos, drawClippingSize);
textToDisplay = "<b>" + m_property->m_title + "</b><br/>";
bool newLine = false;
@ -479,6 +484,7 @@ void appl::ElementDisplayed::generateDisplay(vec2 _startPos, vec2 _size) {
textToDisplay += "<br/>";
}
textToDisplay += "<i>" + m_property->m_description + "</i>";
}
} else {
std::unique_lock<std::mutex> lock(m_propertyGroup->m_mutex);
//m_text.setClipping(drawClippingPos, drawClippingSize);