Throw a debounce back in for performance
A scroll-event-based function every tenth of a second is better than whatever arbitrary timer scroll events can have.
This commit is contained in:
parent
a7ce01cb61
commit
f782b0d3c0
@ -9694,7 +9694,7 @@
|
||||
}
|
||||
return arr.splice(0, i);
|
||||
},
|
||||
read: function(e) {
|
||||
read: $.debounce(100, function(e) {
|
||||
var ID, height, post, posts;
|
||||
if (d.hidden || !Unread.posts.length) {
|
||||
return;
|
||||
@ -9722,7 +9722,7 @@
|
||||
if (e) {
|
||||
return Unread.update();
|
||||
}
|
||||
},
|
||||
}),
|
||||
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
|
||||
if (Unread.thread.isDead) {
|
||||
return;
|
||||
|
||||
@ -9677,7 +9677,7 @@
|
||||
}
|
||||
return arr.splice(0, i);
|
||||
},
|
||||
read: function(e) {
|
||||
read: $.debounce(100, function(e) {
|
||||
var ID, height, post, posts;
|
||||
if (d.hidden || !Unread.posts.length) {
|
||||
return;
|
||||
@ -9705,7 +9705,7 @@
|
||||
if (e) {
|
||||
return Unread.update();
|
||||
}
|
||||
},
|
||||
}),
|
||||
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
|
||||
if (Unread.thread.isDead) {
|
||||
return;
|
||||
|
||||
@ -135,7 +135,7 @@ Unread =
|
||||
break if post.ID > Unread.lastReadPost
|
||||
arr.splice 0, i
|
||||
|
||||
read: (e) ->
|
||||
read: $.debounce 100, (e) ->
|
||||
return if d.hidden or !Unread.posts.length
|
||||
height = doc.clientHeight
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user