From c1537e04e922bd8cb1d9a62670698d712ead657f Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 3 Jan 2017 00:06:51 +0100 Subject: React to removals in reduced live-query. --- common/datastorequery.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') 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: bool foundValue = false; while(!foundValue && mSource->next([this, callback, &foundValue](const ResultSet::Result &result) { auto reductionValue = result.entity.getProperty(mReductionProperty); + if (result.operation == Sink::Operation_Removal) { + callback(result); + return false; + } if (!mReducedValues.contains(getByteArray(reductionValue))) { //Only reduce every value once. mReducedValues.insert(getByteArray(reductionValue)); -- cgit v1.2.3