diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-10 17:53:11 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-10 17:53:11 -0400 |
commit | 6732f5fbca2dc83ec1cf6fcb31b5a6657e8d040f (patch) | |
tree | 48165a2aa3aed2133d1d79742e3d64cce3ca2b01 /indra/newview/llpanelmarketplaceinboxinventory.cpp | |
parent | 20c3d8485480487d38500c9b18846ca96d1d6f83 (diff) | |
parent | c7b6a25728cd360348d1c3da5ace0971767206a4 (diff) |
merge viewer-development to mesh-development
Diffstat (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp')
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.cpp | 43 |
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 |