Filter: Make +ACTIVE trigger pendingOnly shortcut

This commit is contained in:
Tomas Babej 2021-04-24 13:53:23 -04:00
parent 523e2b40fe
commit 62399239ca

View file

@ -215,6 +215,7 @@ bool Filter::pendingOnly () const
int countXor = 0;
int countNot = 0;
bool pendingTag = false;
bool activeTag = false;
for (const auto& a : Context::getContext ().cli2._args)
{
@ -235,7 +236,8 @@ bool Filter::pendingOnly () const
for (const auto& word : Context::getContext ().cli2._original_args)
{
if (word.attribute ("raw") == "+PENDING") pendingTag = true;
if (word.attribute ("raw") == "+PENDING") pendingTag = true;
if (word.attribute ("raw") == "+ACTIVE") activeTag = true;
}
@ -245,7 +247,7 @@ bool Filter::pendingOnly () const
if (countOr || countXor || countNot)
return false;
if (pendingTag)
if (pendingTag || activeTag)
return true;
if (countStatus)