We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e97223b2 authored by Evan Prodromou's avatar Evan Prodromou

Don't add a notice if it already exists on the page

Try not to interfere with Ajax posting; don't show something if it's
already on the page.
parent db3b56a2
......@@ -23,6 +23,14 @@ var updater = function()
function receive(message)
{
id = message.data.id;
// Don't add it if it already exists
if ($("#notice-"+id).length > 0) {
return;
}
var noticeItem = makeNoticeItem(message.data);
$("#notices_primary .notices").prepend(noticeItem, true);
$("#notices_primary .notice:first").css({display:"none"});
......
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