Fix more issues with LL's legacy search:

* Remember last selected tab across sessions
* Searching for groups via groups panel in contacts always opening FS legacy search
This commit is contained in:
Ansariel
2026-05-07 21:58:18 +02:00
parent b15556fd0b
commit 9353f48179
3 changed files with 23 additions and 1 deletions
+21
View File
@@ -106,6 +106,11 @@ bool LLFloaterDirectory::postBuild()
});
mDirectoryTabs = getChild<LLTabContainer>("Directory Tabs");
mDirectoryTabs->setCommitCallback([&](LLUICtrl*, const LLSD&) { updateProfileButtonVisibility(); });
if (!mDirectoryTabs->selectTab(gSavedSettings.getS32("FSLastSearchTab")))
{
mDirectoryTabs->selectFirstTab();
}
// </FS:Ansariel>
// <FS:TJ> Always navigate if the SearchURL has changed
@@ -120,6 +125,12 @@ void LLFloaterDirectory::onOpen(const LLSD& key)
{
LLFloater::onOpen(key);
if (key.has("tab") && key["tab"].asString() == "groups")
{
mDirectoryTabs->selectTabByName("panel_dir_groups");
return;
}
// <FS:TJ> Always navigate if the SearchURL has changed
std::string search_url = LFSimFeatureHandler::instance().searchURL();
if (search_url.empty())
@@ -148,6 +159,16 @@ void LLFloaterDirectory::onOpen(const LLSD& key)
}
// </FS:PP>
// <FS:Ansariel> Remember last selected tab across sessions
void LLFloaterDirectory::onClose(bool app_quitting)
{
if (mDirectoryTabs)
{
gSavedSettings.setS32("FSLastSearchTab", mDirectoryTabs->getCurrentPanelIndex());
}
}
// </FS:Ansariel>
void LLFloaterDirectory::hideAllDetailPanels()
{
if (mPanelAvatarp) mPanelAvatarp->setVisible(false);
+1
View File
@@ -68,6 +68,7 @@ public:
bool postBuild() override;
void onOpen(const LLSD& key) override; // <FS:PP> FIRE-36483 Menu, navbar and toolbar button must open the same search window
void onClose(bool app_quitting) override; // <FS:Ansariel> Remember last selected tab across sessions
void updateProfileButtonVisibility(); // <FS:Ansariel> Add "open profile" button
+1 -1
View File
@@ -263,7 +263,7 @@ void LLGroupActions::search()
{
// <FS:Ansariel> Open groups search panel instead of invoking presumed failed websearch
//LLFloaterReg::showInstance("search", LLSD().with("collection", "groups"));
LLFloaterReg::showInstance("search", LLSD().with("tab", "groups"));
LLFloaterReg::showInstance((gSavedSettings.getBOOL("FSUseFSLegacySearch") ? "search" : "legacy_search"), LLSD().with("tab", "groups"));
// </FS:Ansariel>
}