DEV-44136: Hide previous results when performing new search.
When a new search is performed, we first display a blank page in the search floater so that the previous results are not visible while the new results are being retrieved from the search server.master
parent
32657e37ab
commit
3726d3bda8
|
|
@ -77,6 +77,15 @@ void LLFloaterSearch::onOpen(const LLSD& key)
|
|||
search(key);
|
||||
}
|
||||
|
||||
void LLFloaterSearch::onClose(bool app_quitting)
|
||||
{
|
||||
if (! app_quitting)
|
||||
{
|
||||
// Show the blank home page ready for the next onOpen()
|
||||
mBrowser->navigateHome();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
|
||||
{
|
||||
switch (event)
|
||||
|
|
@ -110,6 +119,11 @@ void LLFloaterSearch::search(const LLSD &key)
|
|||
return;
|
||||
}
|
||||
|
||||
// display the blank home page first, to clear the display of
|
||||
// any previous search results while the new results load.
|
||||
// The home page is set in floater_search.xml as start_url.
|
||||
mBrowser->navigateHome();
|
||||
|
||||
// reset the god level warning as we're sending the latest state
|
||||
childHide("refresh_search");
|
||||
mSearchGodLevel = gAgent.getGodLevel();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ public:
|
|||
/// see search() for details on the key parameter.
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
/// perform a search with the specific search term.
|
||||
/// The key should be a map that can contain the following keys:
|
||||
/// - "id": specifies the text phrase to search for
|
||||
|
|
|
|||
Loading…
Reference in New Issue