diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-28 22:58:17 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-28 22:58:17 +0000 |
commit | 0aa2bc4831674e61edf680887eba9acec9f997ed (patch) | |
tree | edf19fd9b857cf13b9e7ad943b65178954b4811c /indra/newview/llcallingcard.cpp | |
parent | 51500f82e23b7deff9a0e1bc23f5bfa40aec1fb9 (diff) |
svn merge -r 1490-1500 https://svn.aws.productengine.com/secondlife/pe/stable-2
Bug Fixes:
* EXT-637 EXT-595
Dev work:
* EXT-694
QA:
* Be sure feature works on other locales
Known issues:
* If old Calling Card of person who presents in the friend list is removed - "Do you want to remove ..." dialog is shown, if old Calling Card of non-friend is removed it is removed in the old way without any alerts.
* It is possible to create 2 deep level subfolders under the Calling Cards/Friends/ subfolders. This should be disabled due to Accordion does not support tree hierarchy.
* If friendship is removed when agent is offline, Friend Card is not removed from Inventory.
Diffstat (limited to 'indra/newview/llcallingcard.cpp')
-rw-r--r-- | indra/newview/llcallingcard.cpp | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 355a90209a..7326e39af3 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -95,29 +95,8 @@ const F32 OFFLINE_SECONDS = FIND_FREQUENCY + 8.0f; // static LLAvatarTracker LLAvatarTracker::sInstance; -/* -class LLAvatarTrackerInventoryObserver : public LLInventoryObserver -{ -public: - LLAvatarTrackerInventoryObserver(LLAvatarTracker* at) : - mAT(at) {} - virtual ~LLAvatarTrackerInventoryObserver() {} - virtual void changed(U32 mask); -protected: - LLAvatarTracker* mAT; -}; -*/ -/* -void LLAvatarTrackerInventoryObserver::changed(U32 mask) -{ - // if there's a calling card change, just do it. - if((mask & LLInventoryObserver::CALLING_CARD) != 0) - { - mAT->inventoryChanged(); - } -} -*/ + ///---------------------------------------------------------------------------- /// Class LLAvatarTracker @@ -329,7 +308,8 @@ void LLAvatarTracker::terminateBuddy(const LLUUID& id) msg->nextBlock("ExBlock"); msg->addUUID("OtherID", id); gAgent.sendReliableMessage(); - mModifyMask |= LLFriendObserver::REMOVE; + + addChangedMask(LLFriendObserver::REMOVE, id); delete buddy; } @@ -503,6 +483,18 @@ void LLAvatarTracker::notifyObservers() (*it)->changed(mModifyMask); } mModifyMask = LLFriendObserver::NONE; + mChangedBuddyIDs.clear(); +} + +// store flag for change +// and id of object change applies to +void LLAvatarTracker::addChangedMask(U32 mask, const LLUUID& referent) +{ + mModifyMask |= mask; + if (referent.notNull()) + { + mChangedBuddyIDs.insert(referent); + } } void LLAvatarTracker::applyFunctor(LLRelationshipFunctor& f) @@ -706,7 +698,7 @@ void LLAvatarTracker::formFriendship(const LLUUID& id) //visible online to each other. buddy_info = new LLRelationship(LLRelationship::GRANT_ONLINE_STATUS,LLRelationship::GRANT_ONLINE_STATUS, false); at.mBuddyInfo[id] = buddy_info; - at.mModifyMask |= LLFriendObserver::ADD; + at.addChangedMask(LLFriendObserver::ADD, id); at.notifyObservers(); } } @@ -722,7 +714,7 @@ void LLAvatarTracker::processTerminateFriendship(LLMessageSystem* msg, void**) LLRelationship* buddy = get_ptr_in_map(at.mBuddyInfo, id); if(!buddy) return; at.mBuddyInfo.erase(id); - at.mModifyMask |= LLFriendObserver::REMOVE; + at.addChangedMask(LLFriendObserver::REMOVE, id); delete buddy; at.notifyObservers(); } |