From 523e2b40fef698e1b44c70975968c476851a798f Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 24 Apr 2021 13:35:20 -0400 Subject: [PATCH] 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. --- src/Filter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Filter.cpp b/src/Filter.cpp index 2fc057f9a..85cb553db 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -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)