diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-03-09 11:24:54 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-03-09 11:24:54 -0500 |
commit | c8293e29caf4701f130141a88b90709a09143d4e (patch) | |
tree | fc84848355f3c5d21e3fd6dd1ba2c5eade2d8c03 /indra/newview/llpanelpeople.cpp | |
parent | 94b0ce6d842a1f34bd46535a8b4db68aa397a541 (diff) | |
parent | 76a325b83271424d231561d8ef099df1406c9517 (diff) |
Automated merge up from viewer-development into mesh-development
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index b07a46a222..b52f33ec3b 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -384,6 +384,16 @@ private: { lldebugs << "Inventory changed: " << mask << llendl; + static bool synchronize_friends_folders = true; + if (synchronize_friends_folders) + { + // Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" folder, + // fetches their contents if needed and synchronizes it with buddies list. + // If the folders are not found they are created. + LLFriendCardsManager::instance().syncFriendCardsFolders(); + synchronize_friends_folders = false; + } + // *NOTE: deleting of InventoryItem is performed via moving to Trash. // That means LLInventoryObserver::STRUCTURE is present in MASK instead of LLInventoryObserver::REMOVE if ((CALLINGCARD_ADDED & mask) == CALLINGCARD_ADDED) @@ -750,18 +760,23 @@ void LLPanelPeople::updateFriendList() all_friendsp.clear(); online_friendsp.clear(); - LLFriendCardsManager::folderid_buddies_map_t listMap; + uuid_vec_t buddies_uuids; + LLAvatarTracker::buddy_map_t::const_iterator buddies_iter; + + // Fill the avatar list with friends UUIDs + for (buddies_iter = all_buddies.begin(); buddies_iter != all_buddies.end(); ++buddies_iter) + { + buddies_uuids.push_back(buddies_iter->first); + } - // *NOTE: For now collectFriendsLists returns data only for Friends/All folder. EXT-694. - LLFriendCardsManager::instance().collectFriendsLists(listMap); - if (listMap.size() > 0) + if (buddies_uuids.size() > 0) { - lldebugs << "Friends Cards were found, count: " << listMap.begin()->second.size() << llendl; - all_friendsp = listMap.begin()->second; + lldebugs << "Friends added to the list: " << buddies_uuids.size() << llendl; + all_friendsp = buddies_uuids; } else { - lldebugs << "Friends Cards were not found" << llendl; + lldebugs << "No friends found" << llendl; } LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); |