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

Commit 4fbb6b0d authored by Sarven Capadisli's avatar Sarven Capadisli

Removed setTimeout. It was initially intended to prevent dupes but

this is not the case with 0.9.x's util.js as opposed to 0.8.x, where it
didn't properly check if a given notice id is already in the list
parent edf9b386
......@@ -58,23 +58,21 @@ RealtimeUpdate = {
receive: function(data)
{
setTimeout(function() {
id = data.id;
// Don't add it if it already exists
if ($("#notice-"+id).length > 0) {
return;
}
var noticeItem = RealtimeUpdate.makeNoticeItem(data);
$("#notices_primary .notices").prepend(noticeItem);
$("#notices_primary .notice:first").css({display:"none"});
$("#notices_primary .notice:first").fadeIn(1000);
SN.U.NoticeReply();
RealtimeUpdate._updatecounter += 1;
document.title = '('+RealtimeUpdate._updatecounter+') ' + DT;
}, 500);
id = data.id;
// Don't add it if it already exists
if ($("#notice-"+id).length > 0) {
return;
}
var noticeItem = RealtimeUpdate.makeNoticeItem(data);
$("#notices_primary .notices").prepend(noticeItem);
$("#notices_primary .notice:first").css({display:"none"});
$("#notices_primary .notice:first").fadeIn(1000);
SN.U.NoticeReply();
RealtimeUpdate._updatecounter += 1;
document.title = '('+RealtimeUpdate._updatecounter+') ' + DT;
},
makeNoticeItem: function(data)
......
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