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.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 6f069cca17..7f28e09933 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -111,8 +111,11 @@ class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
public:
typedef boost::function<void()> callback_t;
- LLInitialFriendCardsFetch(callback_t cb)
- : mCheckFolderCallback(cb) {}
+ LLInitialFriendCardsFetch(const LLUUID& folder_id,
+ callback_t cb) :
+ LLInventoryFetchDescendentsObserver(folder_id),
+ mCheckFolderCallback(cb)
+ {}
/* virtual */ void done();
@@ -408,13 +411,9 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id, callback_t cb)
{
// This instance will be deleted in LLInitialFriendCardsFetch::done().
- LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb);
-
- uuid_vec_t folders;
- folders.push_back(folder_id);
-
- fetch->fetch(folders);
- if(fetch->isEverythingComplete())
+ LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folder_id, cb);
+ fetch->startFetch();
+ if(fetch->isFinished())
{
// everything is already here - call done.
fetch->done();