diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-09-06 12:44:03 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-09-06 12:44:03 -0700 |
commit | b3a2bd0d4d2ab633d2f8d73df5435677bcc1f5eb (patch) | |
tree | a5c08cabbc60dd386070f5d4bc5828205e158696 | |
parent | 16b34829993c1d59aaeeeafaea68c9aa8e0a5035 (diff) |
EXP-1194 FIX -- Update New tag behavior to update Newness timestamp when Received Items panel is open and do not auto open Received Items panel
* The inbox no longer auto-expands under any condition.
* Changed new-ness timestamp from "LastInventoryInboxCollapse" to "LastInventoryInboxExpansion" to eschew obfuscation.
* "LastInventoryInboxExpansion" now saved out when user opens the panel.
-rw-r--r-- | indra/newview/app_settings/settings_per_account.xml | 4 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinbox.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 28 |
4 files changed, 22 insertions, 23 deletions
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 9064d6894d..49f8a11e3e 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -33,10 +33,10 @@ <key>Value</key> <string /> </map> - <key>LastInventoryInboxCollapse</key> + <key>LastInventoryInboxExpansion</key> <map> <key>Comment</key> - <string>The last time the received items inbox was collapsed.</string> + <string>The last time the received items inbox was expanded for view.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index a73742b68f..9f17c34dfb 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -53,10 +53,6 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p) LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
{
- if (isInVisibleChain() && getChild<LLButton>("inbox_btn")->getToggleState())
- {
- gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString());
- }
}
// virtual
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index e5fe2d0504..e5b0db92f3 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -200,16 +200,13 @@ BOOL LLInboxFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderVi void LLInboxFolderViewFolder::updateFlag() const { - const std::string& last_collapse = gSavedPerAccountSettings.getString("LastInventoryInboxCollapse"); + const std::string& last_expansion = gSavedPerAccountSettings.getString("LastInventoryInboxExpansion"); - if (!last_collapse.empty()) + if (!last_expansion.empty()) { - LLDate saved_freshness_date = LLDate(last_collapse); - //llinfos << "Saved freshness: " << saved_freshness_date.secondsSinceEpoch() << llendl; + LLDate saved_freshness_date = LLDate(last_expansion); mFresh = (mCreationDate > saved_freshness_date.secondsSinceEpoch()); - - //llinfos << " Creation date: " << mCreationDate << " -- fresh -- " << mFresh << " -- this -- " << (void*)&*(this) << llendl; } } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index a8a9f4948b..d958109927 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -64,6 +64,9 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ // Constants // +// No longer want the inbox panel to auto-expand since it creates issues with the "new" tag time stamp +#define AUTO_EXPAND_INBOX 0 + static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; @@ -447,6 +450,7 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) // Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting LLInventoryModelBackgroundFetch::instance().start(inbox_id); +#if AUTO_EXPAND_INBOX // If the outbox is expanded, don't auto-expand the inbox if (mOutboxEnabled) { @@ -455,13 +459,14 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) return; } } - + // Expand the inbox since we have fresh items and the outbox is not expanded if (mInboxEnabled) { getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true); onToggleInboxBtn(); - } + } +#endif } void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) @@ -525,11 +530,11 @@ void LLSidepanelInventory::onToggleInboxBtn() LLButton* outboxButton = getChild<LLButton>(OUTBOX_BUTTON_NAME); LLLayoutPanel* outboxPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME); - bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); + const bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); - if (!inbox_expanded && inboxPanel->isInVisibleChain()) + if (inbox_expanded && inboxPanel->isInVisibleChain()) { - gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); + gSavedPerAccountSettings.setString("LastInventoryInboxExpansion", LLDate::now().asString()); } } @@ -540,19 +545,14 @@ void LLSidepanelInventory::onToggleOutboxBtn() LLButton* outboxButton = getChild<LLButton>(OUTBOX_BUTTON_NAME); LLLayoutPanel* outboxPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME); - bool inbox_was_expanded = inboxButton->getToggleState(); manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel); - - if (inbox_was_expanded && inboxPanel->isInVisibleChain()) - { - gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); - } } void LLSidepanelInventory::onOpen(const LLSD& key) { LLFirstUse::newInventory(false); +#if AUTO_EXPAND_INBOX // Expand the inbox if we have fresh items LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL); if (inbox && (inbox->getFreshItemCount() > 0)) @@ -560,6 +560,12 @@ void LLSidepanelInventory::onOpen(const LLSD& key) getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true); onToggleInboxBtn(); } +#else + if (mInboxEnabled && getChild<LLButton>(INBOX_BUTTON_NAME)->getToggleState()) + { + gSavedPerAccountSettings.setString("LastInventoryInboxExpansion", LLDate::now().asString()); + } +#endif if(key.size() == 0) return; |