Commit a0b25b34 authored by marc duez's avatar marc duez
Browse files

notification.js : ignore already displayed notifications

parent cd663e24
......@@ -2,6 +2,7 @@
function Notification(m) {
this.m = m
this.m.notification = this
this.old = []; //store id of already displayed notification for this session
}
......@@ -71,11 +72,14 @@ Notification.prototype = {
priorities = { 'urgent': 3, 'info': 1 };
if (this.old.indexOf(messages[i].notification.id) == -1) {
this.old.push(messages[i].notification.id);
console.log({
msg: display_title, type: 'flash',
call: { path: 'notification/index', args: { 'id': messages[i].notification.id } },
priority: priorities[messages[i].notification.priority]
});
}
}
}
}
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