diff options
author | Merov Linden <merov@lindenlab.com> | 2014-10-21 21:46:16 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-10-21 21:46:16 -0700 |
commit | f99dbd9be0f631ee9135ac89d8322c359711d626 (patch) | |
tree | b4e6611debc3020057f580b7eaaebfe4fd201bdf /indra/newview/llviewermessage.cpp | |
parent | eeb5fb382bdb45c4c886a113506b777e85cbf4e2 (diff) |
DD-224 : WIP : Add a deleteListing method, call SLM_UPDATE_FOLDER notification if state is deleted
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-x | indra/newview/llviewermessage.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 871ed8c0df..931b16ccb7 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5968,9 +5968,18 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // Special Marketplace update notification if (notificationID == "SLM_UPDATE_FOLDER") { + std::string state = llsdBlock["state"].asString(); + llinfos << "Merov : SLM_UPDATE_FOLDER, state = " << state << ", id = " << llsdBlock["listing_id"].asInteger() << llendl; // In general, no message will be displayed, all we want is to get the listing updated in the marketplace floater - // If getListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification() - return LLMarketplaceData::instance().getListing(llsdBlock["listing_id"].asInteger()); + // If getListing() or deleteListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification() + if (state == "deleted") + { + return LLMarketplaceData::instance().deleteListing(llsdBlock["listing_id"].asInteger()); + } + else + { + return LLMarketplaceData::instance().getListing(llsdBlock["listing_id"].asInteger()); + } } LLNotificationsUtil::add(notificationID, llsdBlock); |