diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-05-29 23:37:58 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-05-30 00:04:57 +0300 |
commit | 5b9b4fcf6657ce2cfa5fde85012fe24213df37b5 (patch) | |
tree | bd8980c016bcfaf4edfa9252eb8149c81f7ad9be /indra | |
parent | 6586055320922b4219d382f24383b00e20387e03 (diff) |
SL-17429 Message user when their inventory hits AIS2 limits
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.cpp | 25 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 8 |
2 files changed, 30 insertions, 3 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 6b88d0aaf7..f544b318d6 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -30,8 +30,10 @@ #include "llagent.h" #include "llappviewer.h" #include "llcallbacklist.h" -#include "llinventorypanel.h" #include "llinventorymodel.h" +#include "llinventorypanel.h" +#include "llnotificationsutil.h" +#include "llstartup.h" #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewermessage.h" @@ -802,12 +804,24 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http if(status == LLCore::HttpStatus(HTTP_FORBIDDEN)) { - // too large, split into two, assume that this isn't the library + // Too large, split into two if possible + if (gDisconnected || LLApp::isExiting()) + { + return; + } + const std::string url(gAgent.getRegionCapability("FetchInventoryDescendents2")); + if (url.empty()) + { + LL_WARNS(LOG_INV) << "Failed to get AIS2 cap" << LL_ENDL; + return; + } + S32 size = mRequestSD["folders"].size(); - if (!gDisconnected && !LLApp::isExiting() && !url.empty() && size > 1) + if (size > 1) { + // Can split, assume that this isn't the library LLSD folders; uuid_vec_t recursive_cats; LLSD::array_iterator iter = mRequestSD["folders"].beginArray(); @@ -838,6 +852,11 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http gInventory.requestPost(false, url, request_body, handler, "Inventory Folder"); return; } + else + { + // Can't split + LLNotificationsUtil::add("InventoryLimitReachedAIS"); + } } // This was originally the request retry logic for the inventory diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f9211600ea..a216ef7c0d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6370,6 +6370,14 @@ Your trash is overflowing. This may cause problems logging in. </notification> <notification + icon="notifytip.tga" + name="InventoryLimitReachedAIS" + type="notifytip"> +Your inventory is experiencing issues. Please, contact support. + <tag>fail</tag> + </notification> + + <notification icon="alertmodal.tga" name="ConfirmClearBrowserCache" type="alertmodal"> |