summaryrefslogtreecommitdiff
path: root/indra/newview/llfriendcard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfriendcard.cpp')
-rw-r--r--indra/newview/llfriendcard.cpp41
1 files changed, 28 insertions, 13 deletions
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index e395da7f1e..ce28915d93 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -478,14 +478,24 @@ void LLFriendCardsManager::ensureFriendsFolderExists()
LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL;
}
- friends_folder_ID = gInventory.createNewCategory(calling_cards_folder_ID,
- LLFolderType::FT_CALLINGCARD, get_friend_folder_name());
-
- gInventory.createNewCategory(friends_folder_ID,
- LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name());
-
- // Now when we have all needed folders we can sync their contents with buddies list.
- syncFriendsFolder();
+ gInventory.createNewCategory(
+ calling_cards_folder_ID,
+ LLFolderType::FT_CALLINGCARD,
+ get_friend_folder_name(),
+ [](const LLUUID &new_category_id)
+ {
+ gInventory.createNewCategory(
+ new_category_id,
+ LLFolderType::FT_CALLINGCARD,
+ get_friend_all_subfolder_name(),
+ [](const LLUUID &new_category_id)
+ {
+ // Now when we have all needed folders we can sync their contents with buddies list.
+ LLFriendCardsManager::getInstance()->syncFriendsFolder();
+ }
+ );
+ }
+ );
}
}
@@ -510,11 +520,16 @@ void LLFriendCardsManager::ensureFriendsAllFolderExists()
LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL;
}
- friends_all_folder_ID = gInventory.createNewCategory(friends_folder_ID,
- LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name());
-
- // Now when we have all needed folders we can sync their contents with buddies list.
- syncFriendsFolder();
+ gInventory.createNewCategory(
+ friends_folder_ID,
+ LLFolderType::FT_CALLINGCARD,
+ get_friend_all_subfolder_name(),
+ [](const LLUUID &new_cat_id)
+ {
+ // Now when we have all needed folders we can sync their contents with buddies list.
+ LLFriendCardsManager::getInstance()->syncFriendsFolder();
+ }
+ );
}
}