summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterfacebook.cpp20
-rw-r--r--indra/newview/llfloaterfacebook.h1
2 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp
index 6c2c2428c5..4e6dd002ed 100644
--- a/indra/newview/llfloaterfacebook.cpp
+++ b/indra/newview/llfloaterfacebook.cpp
@@ -51,6 +51,8 @@
#include "lltabcontainer.h"
#include "llavatarlist.h"
#include "llpanelpeoplemenus.h"
+#include "llaccordionctrl.h"
+#include "llaccordionctrltab.h"
static LLRegisterPanelClassWrapper<LLFacebookStatusPanel> t_panel_status("llfacebookstatuspanel");
static LLRegisterPanelClassWrapper<LLFacebookPhotoPanel> t_panel_photo("llfacebookphotopanel");
@@ -799,11 +801,27 @@ bool LLFacebookFriendsPanel::updateSuggestedFriendList()
//Force a refresh when there aren't any filter matches (prevent displaying content that shouldn't display)
mSecondLifeFriends->setDirty(true, !mSecondLifeFriends->filterHasMatches());
mSuggestedFriends->setDirty(true, !mSuggestedFriends->filterHasMatches());
- //showFriendsAccordionsIfNeeded();
+ showFriendsAccordionsIfNeeded();
return false;
}
+void LLFacebookFriendsPanel::showFriendsAccordionsIfNeeded()
+{
+ // Expand and show accordions if needed, else - hide them
+ getChild<LLAccordionCtrlTab>("tab_second_life_friends")->setVisible(mSecondLifeFriends->filterHasMatches());
+ getChild<LLAccordionCtrlTab>("tab_suggested_friends")->setVisible(mSuggestedFriends->filterHasMatches());
+
+ // Rearrange accordions
+ LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion");
+ accordion->arrange();
+
+ // *TODO: new no_matched_tabs_text attribute was implemented in accordion (EXT-7368).
+ // this code should be refactored to use it
+ // keep help text in a synchronization with accordions visibility.
+ //updateFriendListHelpText();
+}
+
void LLFacebookFriendsPanel::updateFacebookList(bool visible)
{
if (visible)
diff --git a/indra/newview/llfloaterfacebook.h b/indra/newview/llfloaterfacebook.h
index c13d64a86a..16c9e97ff0 100644
--- a/indra/newview/llfloaterfacebook.h
+++ b/indra/newview/llfloaterfacebook.h
@@ -136,6 +136,7 @@ public:
private:
bool updateSuggestedFriendList();
+ void showFriendsAccordionsIfNeeded();
void updateFacebookList(bool visible);
bool onConnectedToFacebook(const LLSD& data);