Fix Unread.read
This commit is contained in:
parent
73250fcc3d
commit
bcc68168b0
@ -7968,20 +7968,24 @@
|
||||
i = 0;
|
||||
while (post = posts[i]) {
|
||||
bottom = post.nodes.root.getBoundingClientRect().bottom;
|
||||
if (bottom > height) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
ID = post.ID;
|
||||
if (Conf['Quote Threading']) {
|
||||
posts.splice(i, 1);
|
||||
continue;
|
||||
if (bottom < height) {
|
||||
ID = post.ID;
|
||||
if (Conf['Quote Threading']) {
|
||||
posts.splice(i, 1);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
posts.splice(0, i);
|
||||
break;
|
||||
if (!Conf['Quote Threading']) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (!Conf['Quote Threading']) {
|
||||
if (i) {
|
||||
posts.splice(0, i);
|
||||
}
|
||||
}
|
||||
if (!ID) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7949,20 +7949,24 @@
|
||||
i = 0;
|
||||
while (post = posts[i]) {
|
||||
bottom = post.nodes.root.getBoundingClientRect().bottom;
|
||||
if (bottom > height) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
ID = post.ID;
|
||||
if (Conf['Quote Threading']) {
|
||||
posts.splice(i, 1);
|
||||
continue;
|
||||
if (bottom < height) {
|
||||
ID = post.ID;
|
||||
if (Conf['Quote Threading']) {
|
||||
posts.splice(i, 1);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
posts.splice(0, i);
|
||||
break;
|
||||
if (!Conf['Quote Threading']) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (!Conf['Quote Threading']) {
|
||||
if (i) {
|
||||
posts.splice(0, i);
|
||||
}
|
||||
}
|
||||
if (!ID) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -123,18 +123,20 @@ Unread =
|
||||
|
||||
while post = posts[i]
|
||||
{bottom} = post.nodes.root.getBoundingClientRect()
|
||||
if bottom > height # post isnt completely read
|
||||
i++
|
||||
continue
|
||||
|
||||
{ID} = post
|
||||
if Conf['Quote Threading']
|
||||
posts.splice i, 1
|
||||
continue
|
||||
if bottom < height # post is completely read
|
||||
{ID} = post
|
||||
if Conf['Quote Threading']
|
||||
posts.splice i, 1
|
||||
continue
|
||||
else
|
||||
posts.splice 0, i
|
||||
break
|
||||
unless Conf['Quote Threading']
|
||||
break
|
||||
i++
|
||||
|
||||
unless Conf['Quote Threading']
|
||||
if i
|
||||
posts.splice 0, i
|
||||
|
||||
return unless ID
|
||||
|
||||
Unread.lastReadPost = ID if Unread.lastReadPost < ID or !Unread.lastReadPost
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user