# Client does not recieve notification of deleted resources

**URL:** <https://forum.inductiveautomation.com/t/client-does-not-recieve-notification-of-deleted-resources/5246>\
**Category:** Module Development\
**Created:** [October 8, 2012, 9:41am UTC](https://forum.inductiveautomation.com/t/client-does-not-recieve-notification-of-deleted-resources/5246 "2012-10-08T09:41:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [October 8, 2012, 9:41am UTC](https://forum.inductiveautomation.com/t/client-does-not-recieve-notification-of-deleted-resources/5246/1 "2012-10-08T09:41:44Z")

</div>

A ProjectChangeListener added to a client does not appear to receive any notification of deleted resources.

The Project object passed to projectUpdated appears to be a complete project rather than a diff like it is for designers, so it simply does not contain any reference to the deleted resource, either in getResources() or getDeletedResources(). (As expected, projectResourceModified never appears to be called for a client).

It would seem to be a reasonable design decision that clients always receive complete projects. However, this can be a problem for modules which have their own state to keep in sync. Is there any way to tell if a Project is a diff or a complete project?

Thanks.

---

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [October 8, 2012, 9:55am UTC](https://forum.inductiveautomation.com/t/client-does-not-recieve-notification-of-deleted-resources/5246/2 "2012-10-08T09:55:24Z")

</div>

This solution appears to work. Given a Project diff and complete Project project it appears that:  
Designers call projectUpdated(diff) and then project.applyDiff(diff).  
Clients call project.applyDiff(diff) and then projectUpdated(project).

The two cases can be detected by doing:

```auto
void projectUpdated(Project diff) {
    if (diff == context.getProject()) {
        // This is a complete project, reset module state and rebuild.
    } else {
        // This is a diff only.
    }
}
```
