Finish up.

This commit is contained in:
Zixaphir 2013-04-18 23:36:44 -07:00
parent 23bed0ede7
commit e366dd08a6
6 changed files with 33 additions and 15 deletions

View File

@ -6446,7 +6446,7 @@
return arr.splice(0, i);
},
read: function(e) {
var bottom, height, i, post, posts, read, top, _ref;
var ID, bottom, height, i, post, posts, read, top, _ref;
if (d.hidden || !Unread.posts.length) {
return;
@ -6458,14 +6458,14 @@
while (post = posts[--i]) {
_ref = post.nodes.root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top;
if ((bottom < height) && (top > 0)) {
read.push(post);
ID = post.ID;
posts.remove(post);
}
}
if (!read.length) {
if (!ID) {
return;
}
Unread.lastReadPost = read[read.length - 1].ID;
Unread.lastReadPost = ID;
Unread.saveLastReadPost();
Unread.readArray(Unread.postsQuotingYou);
if (e) {
@ -8234,6 +8234,11 @@
if (this.thread.OP === qpost) {
return;
}
if (QuoteThreading.hasRun) {
if (!Unread.posts.contains(qpost)) {
return;
}
}
qroot = qpost.nodes.root;
threadContainer = qroot.nextSibling;
if ((threadContainer != null ? threadContainer.className : void 0) !== 'threadContainer') {

View File

@ -6438,7 +6438,7 @@
return arr.splice(0, i);
},
read: function(e) {
var bottom, height, i, post, posts, read, top, _ref;
var ID, bottom, height, i, post, posts, read, top, _ref;
if (d.hidden || !Unread.posts.length) {
return;
@ -6450,14 +6450,14 @@
while (post = posts[--i]) {
_ref = post.nodes.root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top;
if ((bottom < height) && (top > 0)) {
read.push(post);
ID = post.ID;
posts.remove(post);
}
}
if (!read.length) {
if (!ID) {
return;
}
Unread.lastReadPost = read[read.length - 1].ID;
Unread.lastReadPost = ID;
Unread.saveLastReadPost();
Unread.readArray(Unread.postsQuotingYou);
if (e) {
@ -8251,6 +8251,11 @@
if (this.thread.OP === qpost) {
return;
}
if (QuoteThreading.hasRun) {
if (!Unread.posts.contains(qpost)) {
return;
}
}
qroot = qpost.nodes.root;
threadContainer = qroot.nextSibling;
if ((threadContainer != null ? threadContainer.className : void 0) !== 'threadContainer') {

Binary file not shown.

View File

@ -6359,7 +6359,7 @@
return arr.splice(0, i);
},
read: function(e) {
var bottom, height, i, post, posts, read, top, _ref;
var ID, bottom, height, i, post, posts, read, top, _ref;
if (d.hidden || !Unread.posts.length) {
return;
@ -6371,14 +6371,14 @@
while (post = posts[--i]) {
_ref = post.nodes.root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top;
if ((bottom < height) && (top > 0)) {
read.push(post);
ID = post.ID;
posts.remove(post);
}
}
if (!read.length) {
if (!ID) {
return;
}
Unread.lastReadPost = read[read.length - 1].ID;
Unread.lastReadPost = ID;
Unread.saveLastReadPost();
Unread.readArray(Unread.postsQuotingYou);
if (e) {
@ -8153,6 +8153,11 @@
if (this.thread.OP === qpost) {
return;
}
if (QuoteThreading.hasRun) {
if (!Unread.posts.contains(qpost)) {
return;
}
}
qroot = qpost.nodes.root;
threadContainer = qroot.nextSibling;
if ((threadContainer != null ? threadContainer.className : void 0) !== 'threadContainer') {

View File

@ -108,11 +108,11 @@ Unread =
while post = posts[--i]
{bottom, top} = post.nodes.root.getBoundingClientRect()
if (bottom < height) and (top > 0) # post is completely read
read.push post
ID = post.ID
posts.remove post
return unless read.length
return unless ID
Unread.lastReadPost = read[read.length - 1].ID
Unread.lastReadPost = ID
Unread.saveLastReadPost()
Unread.readArray Unread.postsQuotingYou
Unread.update() if e

View File

@ -70,6 +70,9 @@ QuoteThreading =
delete @cb
return if @thread.OP is qpost
if QuoteThreading.hasRun
return unless Unread.posts.contains qpost
qroot = qpost.nodes.root
threadContainer = qroot.nextSibling