Filter: Consider presence of +PENDING tag signal to skip completed.data
This puts +PENDING at the same level of treatment as status:pending when it comes to decision whether the data processed should be pending only. The mechanism is by no means perfect and should be improved in the future.
This commit is contained in:
@@ -214,6 +214,7 @@ bool Filter::pendingOnly () const
|
||||
int countOr = 0;
|
||||
int countXor = 0;
|
||||
int countNot = 0;
|
||||
bool pendingTag = false;
|
||||
|
||||
for (const auto& a : Context::getContext ().cli2._args)
|
||||
{
|
||||
@@ -232,12 +233,21 @@ bool Filter::pendingOnly () const
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& word : Context::getContext ().cli2._original_args)
|
||||
{
|
||||
if (word.attribute ("raw") == "+PENDING") pendingTag = true;
|
||||
}
|
||||
|
||||
|
||||
if (countUUID)
|
||||
return false;
|
||||
|
||||
if (countOr || countXor || countNot)
|
||||
return false;
|
||||
|
||||
if (pendingTag)
|
||||
return true;
|
||||
|
||||
if (countStatus)
|
||||
{
|
||||
if (!countPending && !countWaiting && !countRecurring)
|
||||
|
||||
Reference in New Issue
Block a user