summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceinboxinventory.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-10-03 13:07:46 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-10-03 13:07:46 -0400
commit38f4e4d5b4cc61701588276f729253ac1721b784 (patch)
tree56b4e824c0ca365bb4e02201df7925caea9843fe /indra/newview/llpanelmarketplaceinboxinventory.cpp
parent285bb44d4cc7e47be474d431d65014ad4e41892b (diff)
parent2465470817957c8378e81ec1a7e32551fbac7b26 (diff)
DRTVWR-589: Merge branch 'main' of viewer-private into DRTVWR-589
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