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

Commit a57783de authored by Sarven Capadisli's avatar Sarven Capadisli

Timeout a little incase the notice item from XHR response is

not appended to the page.
parent d9e7118a
......@@ -30,19 +30,20 @@ RealtimeUpdate = {
receive: function(data)
{
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);
NoticeReply();
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);
NoticeReply();
}, 500);
},
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