summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2014-06-06 16:23:20 -0400
committerJonathan Yap <jhwelch@gmail.com>2014-06-06 16:23:20 -0400
commitf759b3b9121621e14e766865198fb3ba8bdfd00c (patch)
tree783a28beb4815bdc0d5e651f8f1bca523f10c04f
parent89837f385261804781979bdac499d264457e3297 (diff)
STORM-2034 Add a constant, try to fix some datetime logic filtering errors
-rwxr-xr-xindra/newview/llinventoryfilter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index ce0f66edbb..c712e98bd5 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -223,7 +223,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
earliest = 0;
}
- if (FILTER_YOUNGER == mFilterOps.mDateSearchDirection)
+ if (FILTER_YOUNGER == mFilterOps.mDateSearchDirection || isSinceLogoff())
{
if (listener->getCreationDate() < earliest ||
listener->getCreationDate() > mFilterOps.mMaxDate)
@@ -641,6 +641,8 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
{
if (mFilterOps.mHoursAgo != hours)
{
+ const U32 FILTER_NEWER = 1;
+
bool are_date_limits_valid = mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max();
bool is_increasing = hours > mFilterOps.mHoursAgo;
@@ -650,8 +652,8 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
BOOL less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours);
BOOL more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero);
- // Toggle for older than search
- if (0 == mFilterOps.mDateSearchDirection)
+ // Toggle for newer than search
+ if (FILTER_NEWER == mFilterOps.mDateSearchDirection)
{
less_restrictive = !less_restrictive;
more_restrictive = !more_restrictive;