From 54a80085d75f2e286b29c708ae08d5f1e401ce0d Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 30 Apr 2021 20:24:34 +0300 Subject: SL-14769 Add dialog to warn user if inventory is unusable, force logout --- indra/newview/llstartup.cpp | 18 ++++++++++++++++-- indra/newview/skins/default/xui/en/notifications.xml | 11 +++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0cbce1f6e2..ec3180b85a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -308,6 +308,13 @@ void update_texture_fetch() gTextureList.updateImages(0.10f); } +bool finish_force_quit(const LLSD& notification, const LLSD& response) +{ + LLAppViewer::instance()->forceQuit(); + return false; +} + + void set_flags_and_update_appearance() { LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); @@ -1816,7 +1823,11 @@ bool idle_startup() // a usable state and gInventory.isInventoryUsable() will be // true. - // FIXME if inventory is unusable, we need to bail out. + // if inventory is unusable, we need to bail out. + if (!gInventory.isInventoryUsable()) + { + LLNotificationsUtil::add("InventoryUnusable", LLSD(), LLSD(), &finish_force_quit ); + } gInventory.createCommonSystemCategories(); @@ -2155,7 +2166,10 @@ bool idle_startup() if (gAgent.isOutfitChosen() && (wearables_time > max_wearables_time)) { - LLNotificationsUtil::add("ClothingLoading"); + if (gInventory.isInventoryUsable()) + { + LLNotificationsUtil::add("ClothingLoading"); + } record(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, wearables_time); LLStartUp::setStartupState( STATE_CLEANUP ); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a1c73d12d0..a486eb8cf2 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2937,6 +2937,17 @@ Darn. You have been logged out of [SECOND_LIFE]. yestext="View IM & Chat"/> + +There is a problem with your inventory. First, try logging out and logging in again. If you see this message again, contact Support and ask them to correct the problem. + fail + + +