summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceinboxinventory.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-08-15 11:41:00 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-08-15 11:41:00 -0400
commit402a2de7651105d63693deb2872dd6646dd1bd85 (patch)
tree5b0935f876e954a024227355c34a2c23eebe1b8d /indra/newview/llpanelmarketplaceinboxinventory.cpp
parent60d15f78e17a2203d73d58c3f1c2af941d599277 (diff)
parent6b70273603e4aa807662c301179d05a1f2f5a224 (diff)
merging latest viewer-mesh into nyx's sidebranch
Diffstat (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp')
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp43
1 files changed, 42 insertions, 1 deletions
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index b644f0e5cb..2c97d539a1 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -141,9 +141,11 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge
LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p)
: LLFolderViewFolder(p)
, LLBadgeOwner(getHandle())
- , mFresh(false)
+ , mFresh(true)
{
+#if SUPPORTING_FRESH_ITEM_COUNT
initBadgeParams(p.new_badge());
+#endif
}
LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
@@ -151,17 +153,56 @@ LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
}
// virtual
+time_t LLInboxFolderViewFolder::getCreationDate() const
+{
+ time_t ret_val = LLFolderViewFolder::getCreationDate();
+
+ if (!mCreationDate)
+ {
+ updateFlag();
+ }
+
+ return ret_val;
+}
+
+// virtual
void LLInboxFolderViewFolder::draw()
{
+#if SUPPORTING_FRESH_ITEM_COUNT
if (!badgeHasParent())
{
addBadgeToParentPanel();
}
setBadgeVisibility(mFresh);
+#endif
LLFolderViewFolder::draw();
}
+void LLInboxFolderViewFolder::updateFlag() const
+{
+ LLDate saved_freshness_date = LLDate(gSavedPerAccountSettings.getString("LastInventoryInboxExpand"));
+ mFresh = (mCreationDate > saved_freshness_date.secondsSinceEpoch());
+}
+
+void LLInboxFolderViewFolder::selectItem()
+{
+ mFresh = false;
+ LLFolderViewFolder::selectItem();
+}
+
+void LLInboxFolderViewFolder::toggleOpen()
+{
+ mFresh = false;
+ LLFolderViewFolder::toggleOpen();
+}
+
+void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) const
+{
+ mCreationDate = creation_date_utc;
+ updateFlag();
+}
+
// eof