From cdbdb1168694bcbfc58208f2941f513b556a0d6e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 14:47:20 -0400 Subject: 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. --- indra/newview/llfriendcard.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfriendcard.cpp') 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 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. -- cgit v1.2.3