Fixed normal bug EXT-6448 (People -> My Friends list has overlapping text at the top covering the first few contacts.)

Unfortunately I was unable to reproduce this bug. But I have some idea about the reason of it.
Decision to show or not the help text based on count of people in Inventory/Calling Cards/Friends/All list. So, if this list is empty even if Resident has some friend (and at least one of them is online) both help text & online list were shown at the same time.

The reason of why Friends/All can be empty in inventory can be clean cachу & slow connection to upload it from the server. But I could not reproduce it.

So, the fix is to check both all friends & online friends lists to prevent overlaping in the future.

Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/118/

--HG--
branch : product-engine
meow-7.2.2
Mike Antipov 2010-03-26 16:44:43 +02:00
parent 35b5b5e2a3
commit be66b52057
1 changed files with 8 additions and 5 deletions

View File

@ -672,11 +672,6 @@ void LLPanelPeople::updateFriendList()
lldebugs << "Friends Cards were not found" << llendl;
}
// show special help text for just created account to help found friends. EXT-4836
static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg");
no_friends_text->setVisible(all_friendsp.size() == 0);
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
for (; buddy_it != all_buddies.end(); ++buddy_it)
{
@ -685,6 +680,14 @@ void LLPanelPeople::updateFriendList()
online_friendsp.push_back(buddy_id);
}
// show special help text for just created account to help found friends. EXT-4836
static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg");
// Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...)
// So, lets check all lists to avoid overlapping the text with online list. See EXT-6448.
bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0);
no_friends_text->setVisible(!any_friend_exists);
/*
* Avatarlists will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items.
* But avatarlist can be updated only if it is visible @see LLAvatarList::draw();