summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceinboxinventory.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-10-04 07:00:54 +0800
committerErik Kundiman <erik@megapahit.org>2023-10-04 07:00:54 +0800
commit5daccb743f50c7bca066d737ee18295ed38279de (patch)
treea0cd5bd3378b2fc44143658bf2677526bae4c505 /indra/newview/llpanelmarketplaceinboxinventory.cpp
parentdcdd85e4342305bf363c76e6de1e8f8e0ea8840d (diff)
parent5d7b1b09ff195611548bababf36d412ef76ed924 (diff)
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
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