So I had a few issues with this module that I think I was able to fix. The first issue I had was that the second notification gets posted several times. Second, when a notification from an app is already on the list, if a new notification from that app comes in it does not update or push it to the top. Finally, the top of the list is the oldest notification, not the newest. I came up with a solution that seems to work for me so far.
In the phone_notification.js file update the cleanPayload function to look like this
cleanPayload: function(newPayload){
var application_name = newPayload.application_name;
var that = this;
var dupIndex = 0;
if(this.payload.length > 0)
{
this.payload.forEach(function (m) {
// If application_name already exists, increment notification count
if(m.application_name === application_name)
{
m.count++;
that.payload.splice(dupIndex,1);
}
dupIndex++;
});
}
this.payload.unshift(newPayload);
this.payload.slice(0, this.config.displayCount -1);
},
Let me know if this helps or if you have any issues with it.