Discard sync complete event if paused

This commit is contained in:
Martchus 2018-05-17 18:34:05 +02:00
parent e7d365f849
commit 68f5565f1a
1 changed files with 5 additions and 0 deletions

View File

@ -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)) {