From d86def6f03acc3b4a07a30a2f7912e6dc35edf27 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 31 Oct 2011 14:59:10 -0700 Subject: * Added support for items at the top level of "Received Items" instead of just folders. Top-level inbox items are counted both in the total item count and in the fresh item count. --- indra/newview/llpanelmarketplaceinbox.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llpanelmarketplaceinbox.cpp') diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index ac528947a4..7cb4bbf891 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -151,6 +151,20 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const fresh_item_count++; } } + + LLFolderViewFolder::items_t::const_iterator items_it = inbox_folder->getItemsBegin(); + LLFolderViewFolder::items_t::const_iterator items_end = inbox_folder->getItemsEnd(); + + for (; items_it != items_end; ++items_it) + { + const LLFolderViewItem * item_view = *items_it; + const LLInboxFolderViewItem * inbox_item_view = dynamic_cast(item_view); + + if (inbox_item_view && inbox_item_view->isFresh()) + { + fresh_item_count++; + } + } } } @@ -171,6 +185,7 @@ U32 LLPanelMarketplaceInbox::getTotalItemCount() const if (inbox_folder) { item_count += inbox_folder->getFoldersCount(); + item_count += inbox_folder->getItemsCount(); } } -- cgit v1.2.3