From a2150863f97bf4fc49ecc17a2405177abe9d8f73 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 19 Mar 2010 17:18:53 +0200 Subject: Updated normal task EXT-5905 - Resolving offers. Reusable notifications are deleted when user closes IM floater(old - when user closes Viewer). --HG-- branch : product-engine --- indra/newview/lltoastnotifypanel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoastnotifypanel.cpp') diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index d7a3bc1462..907740a88e 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -205,7 +205,7 @@ mCloseNotificationOnDestroy(true) mInfoPanel->setFollowsAll(); snapToMessageHeight(mTextBox, MAX_LENGTH); - if(notification->getPayload()["reusable"].asBoolean()) + if(notification->isReusable()) { mButtonClickConnection = sButtonClickSignal.connect( boost::bind(&LLToastNotifyPanel::onToastPanelButtonClicked, this, _1, _2)); @@ -288,6 +288,8 @@ LLToastNotifyPanel::~LLToastNotifyPanel() std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer()); if (mCloseNotificationOnDestroy && LLNotificationsUtil::find(mNotification->getID()) != NULL) { + // let reusable notification be deleted + mNotification->setReusable(false); LLNotifications::getInstance()->cancel(mNotification); } } @@ -473,7 +475,7 @@ void LLToastNotifyPanel::onClickButton(void* data) response[button_name] = true; } - bool is_reusable = self->mNotification->getPayload()["reusable"].asBoolean(); + bool is_reusable = self->mNotification->isReusable(); // When we call respond(), LLOfferInfo will delete itself in inventory_offer_callback(), // lets copy it while it's still valid. LLOfferInfo* old_info = static_cast(self->mNotification->getResponder()); -- cgit v1.2.3