Skip to content
Snippets Groups Projects
Commit ba96fb5c authored by Leslie Linden's avatar Leslie Linden
Browse files

EXP-1199 FIX -- Inbox new tag sometimes differs from recent item delivery...

EXP-1199 FIX -- Inbox new tag sometimes differs from recent item delivery times, sim timezone settings differences suspected.

* LastInventoryInboxActivity setting now stored as the value of time_correct(),
  the corrected time difference (established at login) between the client and
  official SL time.
parent 97d03860
No related branches found
No related tags found
No related merge requests found
......@@ -34,15 +34,15 @@
<string />
</map>
<key>LastInventoryInboxActivity</key>
<map>
<key>Comment</key>
<map>
<key>Comment</key>
<string>The last time the received items inbox was poked by the user.</string>
<key>Persist</key>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string />
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LastLogoff</key>
<map>
......
......@@ -116,7 +116,7 @@ void LLPanelMarketplaceInbox::onFocusReceived()
sidepanel_inventory->clearSelections(true, false, true);
gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString());
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
......
......@@ -192,20 +192,16 @@ void LLInboxFolderViewFolder::draw()
void LLInboxFolderViewFolder::computeFreshness()
{
const std::string& last_expansion = gSavedPerAccountSettings.getString("LastInventoryInboxActivity");
const U32 last_expansion = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
if (!last_expansion.empty())
if (last_expansion > 0)
{
// Inventory DB timezone is hardcoded to PDT or GMT-7, which is 7 hours behind GMT
const F64 SEVEN_HOURS_IN_SECONDS = 7 * 60 * 60;
const F64 saved_freshness_inventory_db_timezone = LLDate(last_expansion).secondsSinceEpoch() - SEVEN_HOURS_IN_SECONDS;
mFresh = (mCreationDate > saved_freshness_inventory_db_timezone);
mFresh = (mCreationDate > last_expansion);
#if DEBUGGING_FRESHNESS
if (mFresh)
{
llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << saved_freshness_inventory_db_timezone << llendl;
llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion << llendl;
}
#endif
}
......@@ -219,7 +215,7 @@ void LLInboxFolderViewFolder::deFreshify()
{
mFresh = false;
gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString());
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
void LLInboxFolderViewFolder::selectItem()
......
......@@ -539,7 +539,7 @@ void LLSidepanelInventory::onToggleInboxBtn()
if (inbox_expanded && inboxPanel->isInVisibleChain())
{
gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString());
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
}
......@@ -568,7 +568,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key)
#else
if (mInboxEnabled && getChild<LLButton>(INBOX_BUTTON_NAME)->getToggleState())
{
gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString());
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment