diff options
author | Zach Copley <zach@status.net> | 2009-11-18 12:48:17 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-18 12:48:17 -0800 |
commit | 8f2db3820f6ab2c8881521c0adc9a6427b5ea86b (patch) | |
tree | 468438bbb16ddaaa4960ec6079fb6acf754b61cf /plugins | |
parent | 9baddf4e44e173e3e70c4c3f2198857f16320544 (diff) | |
parent | 645b7dec2b40fb9c34306e7b445a120c6c09382d (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
* '0.9.x' of gitorious.org:statusnet/mainline:
Terminology consistency fix: 'Unlock' -> 'Unblock' in unblock form description.
Localisation updates from !translatewiki !StatusNet
Check for dupe from insertNoticeItem()
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Realtime/realtimeupdate.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 9030ad551..a2c4da113 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -66,13 +66,6 @@ RealtimeUpdate = { receive: function(data) { - id = data.id; - - // Don't add it if it already exists - if ($("#notice-"+id).length > 0) { - return; - } - if (RealtimeUpdate._paused === false) { RealtimeUpdate.purgeLastNoticeItem(); @@ -88,6 +81,11 @@ RealtimeUpdate = { }, insertNoticeItem: function(data) { + // Don't add it if it already exists + if ($("#notice-"+data.id).length > 0) { + return; + } + var noticeItem = RealtimeUpdate.makeNoticeItem(data); $("#notices_primary .notices").prepend(noticeItem); $("#notices_primary .notice:first").css({display:"none"}); @@ -253,7 +251,7 @@ RealtimeUpdate = { updateQueuedCounter: function() { - QC = $('#realtime_playpause #queued_counter').html('('+RealtimeUpdate._queuedNotices.length+')'); + $('#realtime_playpause #queued_counter').html('('+RealtimeUpdate._queuedNotices.length+')'); }, removeQueuedCounter: function() |