summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-02-22 18:46:00 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2011-02-22 18:46:00 +0200
commit7f53c0934af677d26b2e584155b77930a2c7a666 (patch)
tree9780de708054b9cf401c4f3d2b8bd960c11de7a9 /indra/newview/llpanelpeople.cpp
parentaa72b0df03c1dfea7571eae4abed30ce9f269158 (diff)
STORM-28 FIXED Added the ability to send agent's own calling card to others.
- Added creating own calling card for the user to be able to share it with other residents. - Moved calling cards synchronization with friends list to the viewer start up. Previously synchronized upon opening the Friends tab in People side panel. - Calling cards for non-friends are not removed upon calling cards synchronization with friends list. - Enabled "Share" menu item for calling cards in inventory.
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp29
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();