diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-08-16 12:14:25 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-08-16 12:14:25 -0700 |
commit | 41cba389f89ff16c0e574ea26d6a1ceb60133ef7 (patch) | |
tree | 12b7b78a0c7884cf49a7ed6b0d624cd30303a0b8 /indra/newview/llpanelmarketplaceinboxinventory.cpp | |
parent | 7f26bbac80669ecd15b666cc6c5ffec77945438b (diff) |
CHUI-269: Problem: When an item was purchased and delivered into the 'Received Items' panel, the badge icon and new item count would not show. This was due to the creation date of the folders not being set when a new item was added. Resolution: Now when an item is added into the 'Received Items' panel, the folder hierachy is updated, triggering the badge icon and new item count to show.
Diffstat (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp')
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.cpp | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 0d3fbe66d7..68aefa7fb7 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -95,22 +95,36 @@ LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p) LLBadgeOwner(getHandle()), mFresh(false) { -#if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -#endif +} + +void LLInboxFolderViewFolder::addItem(LLFolderViewItem* item) +{ + LLFolderViewFolder::addItem(item); + + if(item) + { + LLInvFVBridge* itemBridge = static_cast<LLInvFVBridge*>(item->getViewModelItem()); + LLFolderBridge * bridge = static_cast<LLFolderBridge *>(getViewModelItem()); + bridge->updateHierarchyCreationDate(itemBridge->getCreationDate()); + } + + // Compute freshness if our parent is the root folder for the inbox + if (mParentFolder == mRoot) + { + computeFreshness(); + } } // virtual void LLInboxFolderViewFolder::draw() { -#if SUPPORTING_FRESH_ITEM_COUNT if (!badgeHasParent()) { addBadgeToParentPanel(); } setBadgeVisibility(mFresh); -#endif LLFolderViewFolder::draw(); } @@ -157,17 +171,6 @@ void LLInboxFolderViewFolder::deFreshify() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -// TODO RN: move this behavior to modelview? -//void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) -//{ -// mCreationDate = creation_date_utc; -// -// if (LLFolderViewItem::mParentFolder == mRoot) -// { -// computeFreshness(); -// } -//} - // // LLInboxFolderViewItem Implementation // @@ -177,22 +180,18 @@ LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p) , LLBadgeOwner(getHandle()) , mFresh(false) { -#if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -#endif } void LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) { LLFolderViewItem::addToFolder(folder); -#if SUPPORTING_FRESH_ITEM_COUNT // Compute freshness if our parent is the root folder for the inbox if (mParentFolder == mRoot) { computeFreshness(); } -#endif } BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) @@ -205,14 +204,12 @@ BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) // virtual void LLInboxFolderViewItem::draw() { -#if SUPPORTING_FRESH_ITEM_COUNT if (!badgeHasParent()) { addBadgeToParentPanel(); } setBadgeVisibility(mFresh); -#endif LLFolderViewItem::draw(); } |