diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-03 00:06:51 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-03 00:06:51 +0100 |
commit | c1537e04e922bd8cb1d9a62670698d712ead657f (patch) | |
tree | e3476d020732f623793f1a4e8e29f703cf528fe9 /common/datastorequery.cpp | |
parent | 39e055318b322e6b09782284109fc6748146fa26 (diff) | |
download | sink-c1537e04e922bd8cb1d9a62670698d712ead657f.tar.gz sink-c1537e04e922bd8cb1d9a62670698d712ead657f.zip |
React to removals in reduced live-query.
Diffstat (limited to 'common/datastorequery.cpp')
-rw-r--r-- | common/datastorequery.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp index 2a2f3f5..8bed015 100644 --- a/common/datastorequery.cpp +++ b/common/datastorequery.cpp | |||
@@ -224,6 +224,10 @@ public: | |||
224 | bool foundValue = false; | 224 | bool foundValue = false; |
225 | while(!foundValue && mSource->next([this, callback, &foundValue](const ResultSet::Result &result) { | 225 | while(!foundValue && mSource->next([this, callback, &foundValue](const ResultSet::Result &result) { |
226 | auto reductionValue = result.entity.getProperty(mReductionProperty); | 226 | auto reductionValue = result.entity.getProperty(mReductionProperty); |
227 | if (result.operation == Sink::Operation_Removal) { | ||
228 | callback(result); | ||
229 | return false; | ||
230 | } | ||
227 | if (!mReducedValues.contains(getByteArray(reductionValue))) { | 231 | if (!mReducedValues.contains(getByteArray(reductionValue))) { |
228 | //Only reduce every value once. | 232 | //Only reduce every value once. |
229 | mReducedValues.insert(getByteArray(reductionValue)); | 233 | mReducedValues.insert(getByteArray(reductionValue)); |