From 68f5565f1a949f7f28e838478549309a2f0d40b5 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 17 May 2018 18:34:05 +0200 Subject: [PATCH] Discard sync complete event if paused --- connector/syncthingnotifier.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/connector/syncthingnotifier.cpp b/connector/syncthingnotifier.cpp index 58a89fb..cda588c 100644 --- a/connector/syncthingnotifier.cpp +++ b/connector/syncthingnotifier.cpp @@ -176,6 +176,11 @@ void SyncthingNotifier::emitSyncComplete(ChronoUtilities::DateTime when, const S VAR_UNUSED(when) VAR_UNUSED(index) + // discard event for paused directories/devices + if (dir.paused || (remoteDev && remoteDev->paused)) { + return; + } + // discard event if not enabled if (!m_initialized || (!remoteDev && (m_enabledNotifications & SyncthingHighLevelNotification::LocalSyncComplete) == 0) || (remoteDev && (m_enabledNotifications & SyncthingHighLevelNotification::LocalSyncComplete) == 0)) {