From 142c2fc29c9645df1bff924d6a61c09f04713a7b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 14 Jun 2011 16:35:15 -0700 Subject: EXP-896 FIX -- Inbox not opened by default when new items are received EXP-894 FIX -- When scrolling to the bottom of the inbox, the last item is c... EXP-856 FIX -- Inbox item count reflected as badge on inventory button * Inbox auto-expands when "fresh" items are reported * Logic for "fresh" item determination is still in progress but works for purchases while logged in * Badges now only displayed when the inventory side panel is collapsed or when inventory not visible Reviewed by Leyla --- indra/newview/llsidepanelinventory.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 6ac845385b..33d512d89e 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -43,6 +43,7 @@ #include "lllayoutstack.h" #include "lloutfitobserver.h" #include "llpanelmaininventory.h" +#include "llpanelmarketplaceinbox.h" #include "llselectmgr.h" #include "llsidepaneliteminfo.h" #include "llsidepaneltaskinfo.h" @@ -341,12 +342,6 @@ void LLSidepanelInventory::onToggleInboxBtn() { // Save current time as a setting for future new-ness tests gSavedSettings.setString(INBOX_EXPAND_TIME_SETTING, LLDate::now().asString()); - - // TODO: Hide inbox badge - } - else - { - // TODO: Show inbox badge } } @@ -365,6 +360,14 @@ void LLSidepanelInventory::onOpen(const LLSD& key) { LLFirstUse::newInventory(false); + // Expand the inbox if we have fresh items + LLPanelMarketplaceInbox * inbox = getChild("marketplace_inbox"); + if (inbox && (inbox->getFreshItemCount() > 0)) + { + getChild(INBOX_BUTTON_NAME)->setToggleState(true); + onToggleInboxBtn(); + } + if(key.size() == 0) return; -- cgit v1.2.3