From f928c3fcde9e6089e566484802a34b6e201acab5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 26 Mar 2017 19:37:42 +0200 Subject: Don't filter notifications too early. With this it becomes difficult to test notifications, and notifications may contain more interesting information, so we don't want to drop them too early. --- common/resourceaccess.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'common/resourceaccess.cpp') diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 9f4f14c..ad8cae9 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp @@ -602,12 +602,10 @@ bool ResourceAccess::processMessageBuffer() queuedInvoke([=]() { emit notification(n); }, this); } break; case Sink::Notification::Status: - if (mResourceStatus == buffer->code()) { - SinkTrace() << "Got an unnecessary status notification: " << buffer->code(); - break; + if (mResourceStatus != buffer->code()) { + mResourceStatus = buffer->code(); + SinkTrace() << "Updated status: " << mResourceStatus; } - mResourceStatus = buffer->code(); - SinkTrace() << "Updated status: " << mResourceStatus; [[clang::fallthrough]]; case Sink::Notification::Info: [[clang::fallthrough]]; -- cgit v1.2.3