Undo some changes to Unread.read

This commit is contained in:
Zixaphir 2013-08-08 19:09:54 -07:00
parent bcc68168b0
commit 3429708725
3 changed files with 15 additions and 8 deletions

View File

@ -7907,7 +7907,8 @@
if (Conf['Unread Line']) {
Unread.setLine(posts.contains(Unread.posts[0]));
}
return Unread.read();
Unread.read();
return Unread.update();
},
addPostQuotingYou: function(post) {
var quotelink, _i, _len, _ref;
@ -7957,7 +7958,7 @@
}
return arr.splice(0, i);
},
read: $.debounce(50, function() {
read: $.debounce(50, function(e) {
var ID, bottom, height, i, post, posts;
if (d.hidden || !Unread.posts.length) {
@ -7994,7 +7995,9 @@
}
Unread.saveLastReadPost();
Unread.readArray(Unread.postsQuotingYou);
return Unread.update();
if (e) {
return Unread.update();
}
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {

View File

@ -7888,7 +7888,8 @@
if (Conf['Unread Line']) {
Unread.setLine(posts.contains(Unread.posts[0]));
}
return Unread.read();
Unread.read();
return Unread.update();
},
addPostQuotingYou: function(post) {
var quotelink, _i, _len, _ref;
@ -7938,7 +7939,7 @@
}
return arr.splice(0, i);
},
read: $.debounce(50, function() {
read: $.debounce(50, function(e) {
var ID, bottom, height, i, post, posts;
if (d.hidden || !Unread.posts.length) {
@ -7975,7 +7976,9 @@
}
Unread.saveLastReadPost();
Unread.readArray(Unread.postsQuotingYou);
return Unread.update();
if (e) {
return Unread.update();
}
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {

View File

@ -86,6 +86,7 @@ Unread =
# Force line on visible threads if there were no unread posts previously.
Unread.setLine posts.contains Unread.posts[0]
Unread.read()
Unread.update()
addPostQuotingYou: (post) ->
return unless QR.db
@ -115,7 +116,7 @@ Unread =
break if post.ID > Unread.lastReadPost
arr.splice 0, i
read: $.debounce 50, ->
read: $.debounce 50, (e) ->
return if d.hidden or !Unread.posts.length
height = doc.clientHeight
{posts} = Unread
@ -142,7 +143,7 @@ Unread =
Unread.lastReadPost = ID if Unread.lastReadPost < ID or !Unread.lastReadPost
Unread.saveLastReadPost()
Unread.readArray Unread.postsQuotingYou
Unread.update()
Unread.update() if e
saveLastReadPost: $.debounce 2 * $.SECOND, ->
return if Unread.thread.isDead