Commit 4683d2ba authored by Christian Mollekopf's avatar Christian Mollekopf

Always accept notifications for the parent resource

parent 0fd88a7a
...@@ -347,8 +347,10 @@ bool NotificationSource::acceptsNotification(const Protocol::ChangeNotification ...@@ -347,8 +347,10 @@ bool NotificationSource::acceptsNotification(const Protocol::ChangeNotification
return false; return false;
} }
} else if (notification.type() == Protocol::ChangeNotification::Items) { } else if (notification.type() == Protocol::ChangeNotification::Items) {
//We always want notifications that affect the parent resource (like an item added to a referenced collection)
const bool notificationForParentResource = (mSession == notification.resource());
if (CollectionReferenceManager::instance()->isReferenced(notification.parentCollection())) { if (CollectionReferenceManager::instance()->isReferenced(notification.parentCollection())) {
return (mExclusive || isCollectionMonitored(notification.parentCollection()) || isMoveDestinationResourceMonitored(notification)); return (mExclusive || isCollectionMonitored(notification.parentCollection()) || isMoveDestinationResourceMonitored(notification) || notificationForParentResource);
} }
} else if (notification.type() == Protocol::ChangeNotification::Tags) { } else if (notification.type() == Protocol::ChangeNotification::Tags) {
// Special handling for Tag removal notifications: When a Tag is removed, // Special handling for Tag removal notifications: When a Tag is removed,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment