summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterfacebook.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2014-02-28 02:08:29 +0000
committerCho <cho@lindenlab.com>2014-02-28 02:08:29 +0000
commit261e728327ce72bc582f41cbb231035f0ee1f9b1 (patch)
treebb87afd63703930f52675394ecc06cfbdb47a02a /indra/newview/llfloaterfacebook.cpp
parentdf26597c0d2ddfcc259dd1b8e838164cbd9ff02a (diff)
Made lists only visible when populated in Friends tab in Facebook floater for ACME-1334
Diffstat (limited to 'indra/newview/llfloaterfacebook.cpp')
-rw-r--r--indra/newview/llfloaterfacebook.cpp20
1 files changed, 19 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)