diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-03-16 15:30:01 +0200 | 
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-03-16 15:30:01 +0200 | 
| commit | 97dea26dfca2ebd3d571f80c6e418d7c64779277 (patch) | |
| tree | 96030ecdb096c85f1a40fe00897925cda5592b9f /indra/llui | |
| parent | 3874823bd8a388979bad2d882d5d52bffb8d78da (diff) | |
Updated normal task EXT-5905 - Resolving offers.
Implemented requested feature - "Resolving offer in the notification toast shouldn't remove offer panel form IM log until IM session is restarted"
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llnotifications.cpp | 9 | ||||
| -rw-r--r-- | indra/llui/llnotifications.h | 3 | 
2 files changed, 11 insertions, 1 deletions
| diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7b8970a153..56ec8c4262 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -486,6 +486,7 @@ void LLNotification::updateFrom(LLNotificationPtr other)  	mForm = other->mForm;  	mResponseFunctorName = other->mResponseFunctorName;  	mRespondedTo = other->mRespondedTo; +	mResponse = other->mResponse;  	mTemporaryResponder = other->mTemporaryResponder;  	update(); @@ -563,7 +564,9 @@ std::string LLNotification::getSelectedOptionName(const LLSD& response)  void LLNotification::respond(const LLSD& response)  { +	// *TODO may remove mRespondedTo and use mResponce.isDefined() in isRespondedTo()  	mRespondedTo = true; +	mResponse = response;  	// look up the functor  	LLNotificationFunctorRegistry::ResponseFunctor functor =   		LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName); @@ -875,7 +878,11 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt  		if (wasFound)  		{  			abortProcessing = mChanged(payload); -			mItems.erase(pNotification); +			// do not delete the notification to make LLChatHistory::appendMessage add notification panel to IM window +			if( ! pNotification->getPayload()["reusable"].asBoolean() ) +			{ +				mItems.erase(pNotification); +			}  			onDelete(pNotification);  		}  	} diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 262633206b..a516a6723e 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -344,6 +344,7 @@ private:  	LLDate mExpiresAt;  	bool mCancelled;  	bool mRespondedTo; 	// once the notification has been responded to, this becomes true +	LLSD mResponse;  	bool mIgnored;  	ENotificationPriority mPriority;  	LLNotificationFormPtr mForm; @@ -445,6 +446,8 @@ public:  		return mRespondedTo;  	} +	const LLSD& getResponse() { return mResponse; } +  	bool isIgnored() const  	{  		return mIgnored; | 
