summaryrefslogtreecommitdiff
path: root/indra/newview/llfriendcard.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-04-06 14:47:20 -0400
committerLoren Shih <seraph@lindenlab.com>2010-04-06 14:47:20 -0400
commitcdbdb1168694bcbfc58208f2941f513b556a0d6e (patch)
tree3b024976b8254c11ecb2a11db8929ff035cff446 /indra/newview/llfriendcard.cpp
parentec5bd9c857b4d817685b09f9a10da7434ebbb816 (diff)
EXT-4151 : Immediately check if a fetchObserver filter is done, else add to observer list automatically
FetchObservers now take in a list of IDs to check against. Made some naming changes.
Diffstat (limited to 'indra/newview/llfriendcard.cpp')
-rw-r--r--indra/newview/llfriendcard.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 6f069cca17..aaa09ba5da 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 uuid_vec_t& ids,
+ callback_t cb) :
+ LLInventoryFetchDescendentsObserver(ids),
+ mCheckFolderCallback(cb)
+ {}
/* virtual */ void done();
@@ -407,13 +410,11 @@ 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);
+ // This instance will be deleted in LLInitialFriendCardsFetch::done().
+ LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folders, cb);
+ fetch->startFetch();
if(fetch->isEverythingComplete())
{
// everything is already here - call done.