I have an app which sits open displaying an object list for long times (hours). Every now and then a new object is added to the collection, and thus the list.
I would like to add a little sound effect when this happends.
So, I can attach _uihooks to the wrapper of the {{#each … }}.
(Which is driven by a Collection.find() inside a helper as usual).
So when Blaze adds nodes to the DOM I get insertElement() calls where I can for example trigger a sound.
That’s fine, but my problem is I do not want to do the sound effect when the user causes the list to change (for example on initial rendering, or when the parameters that control the list selections are changed). I only want to do it when there is a reactive update due to a database change.
And I can’t figure how to tell these two cases apart inside the insertElement function…??