diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-07-26 15:47:53 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-07-26 15:47:53 -0700 |
commit | 6b3a7480a137fa6db37f3d6e1b0235a282ecaa17 (patch) | |
tree | dca0c3f77ef2fd40109f10f6ab53f56ec48d90f9 /indra/newview/llpanelmarketplaceinboxinventory.cpp | |
parent | 825fc273ee5167052d811dc058b1834c86e005da (diff) | |
parent | df82fbffa29428af258dc84ce2acbb07180f557e (diff) |
merge
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 |