summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceinboxinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp')
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index 7a6631448b..e13bd0412d 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -62,10 +62,13 @@ LLInboxInventoryPanel::LLInboxInventoryPanel(const LLInboxInventoryPanel::Params
: LLInventoryPanel(p)
{
LLInboxNewItemsStorage::getInstance()->load();
+ LLInboxNewItemsStorage::getInstance()->addInboxPanel(this);
}
LLInboxInventoryPanel::~LLInboxInventoryPanel()
-{}
+{
+ LLInboxNewItemsStorage::getInstance()->removeInboxPanel(this);
+}
void LLInboxInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
@@ -108,6 +111,21 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b
return LLUICtrlFactory::create<LLInboxFolderViewItem>(params);
}
+void LLInboxInventoryPanel::onRemoveItemFreshness(const LLUUID& item_id)
+{
+ LLInboxFolderViewFolder* inbox_folder_view = dynamic_cast<LLInboxFolderViewFolder*>(getFolderByID(item_id));
+ if(inbox_folder_view)
+ {
+ inbox_folder_view->setFresh(false);
+ }
+
+ LLInboxFolderViewItem* inbox_item_view = dynamic_cast<LLInboxFolderViewItem*>(getItemByID(item_id));
+ if(inbox_item_view)
+ {
+ inbox_item_view->setFresh(false);
+ }
+}
+
//
// LLInboxFolderViewFolder Implementation
//
@@ -340,4 +358,18 @@ void LLInboxNewItemsStorage::load()
}
}
}
+
+void LLInboxNewItemsStorage::removeItem(const LLUUID& id)
+{
+ mNewItemsIDs.erase(id);
+
+ //notify inbox panels
+ for (auto inbox : mInboxPanels)
+ {
+ if(inbox)
+ {
+ inbox->onRemoveItemFreshness(id);
+ }
+ }
+}
// eof