diff options
author | Kent Quirk <q@lindenlab.com> | 2010-03-19 12:05:15 -0400 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-03-19 12:05:15 -0400 |
commit | 1e50e4a13a37a236470e088c32c40ff62d46d497 (patch) | |
tree | 08c0d4ee106f40e8f2d11ab89df83bae7a6704f4 /indra/llui/llnotifications.cpp | |
parent | 637105e5cf346e5a88fe5820f36f6233b404d5aa (diff) | |
parent | 7d50a19d6cb46b60ba005280223522672736592d (diff) |
Merge
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r-- | indra/llui/llnotifications.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 56ec8c4262..d7424cf05a 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -403,7 +403,8 @@ LLNotification::LLNotification(const LLNotification::Params& p) : mPriority(p.priority), mCancelled(false), mIgnored(false), - mResponderObj(NULL) + mResponderObj(NULL), + mIsReusable(false) { if (p.functor.name.isChosen()) { @@ -432,7 +433,8 @@ LLNotification::LLNotification(const LLSD& sd) : mRespondedTo(false), mCancelled(false), mIgnored(false), - mResponderObj(NULL) + mResponderObj(NULL), + mIsReusable(false) { mId.generate(); mSubstitutions = sd["substitutions"]; @@ -459,6 +461,7 @@ LLSD LLNotification::asLLSD() output["expiry"] = mExpiresAt; output["priority"] = (S32)mPriority; output["responseFunctor"] = mResponseFunctorName; + output["reusable"] = mIsReusable; return output; } @@ -488,6 +491,7 @@ void LLNotification::updateFrom(LLNotificationPtr other) mRespondedTo = other->mRespondedTo; mResponse = other->mResponse; mTemporaryResponder = other->mTemporaryResponder; + mIsReusable = other->isReusable(); update(); } @@ -573,9 +577,7 @@ void LLNotification::respond(const LLSD& response) // and then call it functor(asLLSD(), response); - bool is_resusable = getPayload()["reusable"].asBoolean(); - - if (mTemporaryResponder && !is_resusable) + if (mTemporaryResponder && !isReusable()) { LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName); mResponseFunctorName = ""; @@ -879,11 +881,11 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt { abortProcessing = mChanged(payload); // do not delete the notification to make LLChatHistory::appendMessage add notification panel to IM window - if( ! pNotification->getPayload()["reusable"].asBoolean() ) + if( ! pNotification->isReusable() ) { mItems.erase(pNotification); + onDelete(pNotification); } - onDelete(pNotification); } } return abortProcessing; |