summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-18 10:46:55 +0000
committerSarven Capadisli <csarven@status.net>2009-11-18 10:46:55 +0000
commit4fbb6b0dfb9ee74accd23d680d45d1cace91974a (patch)
tree3d22e9b8e8c1ad11a86da67edde5343d797a363a /plugins
parentedf9b38637cd48b45c9675247bb3243138d98ffb (diff)
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Realtime/realtimeupdate.js32
1 files changed, 15 insertions, 17 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index aa4c6c15f..165888054 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -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)