Undo some changes to Unread.read
This commit is contained in:
parent
bcc68168b0
commit
3429708725
@ -7907,7 +7907,8 @@
|
|||||||
if (Conf['Unread Line']) {
|
if (Conf['Unread Line']) {
|
||||||
Unread.setLine(posts.contains(Unread.posts[0]));
|
Unread.setLine(posts.contains(Unread.posts[0]));
|
||||||
}
|
}
|
||||||
return Unread.read();
|
Unread.read();
|
||||||
|
return Unread.update();
|
||||||
},
|
},
|
||||||
addPostQuotingYou: function(post) {
|
addPostQuotingYou: function(post) {
|
||||||
var quotelink, _i, _len, _ref;
|
var quotelink, _i, _len, _ref;
|
||||||
@ -7957,7 +7958,7 @@
|
|||||||
}
|
}
|
||||||
return arr.splice(0, i);
|
return arr.splice(0, i);
|
||||||
},
|
},
|
||||||
read: $.debounce(50, function() {
|
read: $.debounce(50, function(e) {
|
||||||
var ID, bottom, height, i, post, posts;
|
var ID, bottom, height, i, post, posts;
|
||||||
|
|
||||||
if (d.hidden || !Unread.posts.length) {
|
if (d.hidden || !Unread.posts.length) {
|
||||||
@ -7994,7 +7995,9 @@
|
|||||||
}
|
}
|
||||||
Unread.saveLastReadPost();
|
Unread.saveLastReadPost();
|
||||||
Unread.readArray(Unread.postsQuotingYou);
|
Unread.readArray(Unread.postsQuotingYou);
|
||||||
return Unread.update();
|
if (e) {
|
||||||
|
return Unread.update();
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
|
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
|
||||||
if (Unread.thread.isDead) {
|
if (Unread.thread.isDead) {
|
||||||
|
|||||||
@ -7888,7 +7888,8 @@
|
|||||||
if (Conf['Unread Line']) {
|
if (Conf['Unread Line']) {
|
||||||
Unread.setLine(posts.contains(Unread.posts[0]));
|
Unread.setLine(posts.contains(Unread.posts[0]));
|
||||||
}
|
}
|
||||||
return Unread.read();
|
Unread.read();
|
||||||
|
return Unread.update();
|
||||||
},
|
},
|
||||||
addPostQuotingYou: function(post) {
|
addPostQuotingYou: function(post) {
|
||||||
var quotelink, _i, _len, _ref;
|
var quotelink, _i, _len, _ref;
|
||||||
@ -7938,7 +7939,7 @@
|
|||||||
}
|
}
|
||||||
return arr.splice(0, i);
|
return arr.splice(0, i);
|
||||||
},
|
},
|
||||||
read: $.debounce(50, function() {
|
read: $.debounce(50, function(e) {
|
||||||
var ID, bottom, height, i, post, posts;
|
var ID, bottom, height, i, post, posts;
|
||||||
|
|
||||||
if (d.hidden || !Unread.posts.length) {
|
if (d.hidden || !Unread.posts.length) {
|
||||||
@ -7975,7 +7976,9 @@
|
|||||||
}
|
}
|
||||||
Unread.saveLastReadPost();
|
Unread.saveLastReadPost();
|
||||||
Unread.readArray(Unread.postsQuotingYou);
|
Unread.readArray(Unread.postsQuotingYou);
|
||||||
return Unread.update();
|
if (e) {
|
||||||
|
return Unread.update();
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
|
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
|
||||||
if (Unread.thread.isDead) {
|
if (Unread.thread.isDead) {
|
||||||
|
|||||||
@ -86,6 +86,7 @@ Unread =
|
|||||||
# Force line on visible threads if there were no unread posts previously.
|
# Force line on visible threads if there were no unread posts previously.
|
||||||
Unread.setLine posts.contains Unread.posts[0]
|
Unread.setLine posts.contains Unread.posts[0]
|
||||||
Unread.read()
|
Unread.read()
|
||||||
|
Unread.update()
|
||||||
|
|
||||||
addPostQuotingYou: (post) ->
|
addPostQuotingYou: (post) ->
|
||||||
return unless QR.db
|
return unless QR.db
|
||||||
@ -115,7 +116,7 @@ Unread =
|
|||||||
break if post.ID > Unread.lastReadPost
|
break if post.ID > Unread.lastReadPost
|
||||||
arr.splice 0, i
|
arr.splice 0, i
|
||||||
|
|
||||||
read: $.debounce 50, ->
|
read: $.debounce 50, (e) ->
|
||||||
return if d.hidden or !Unread.posts.length
|
return if d.hidden or !Unread.posts.length
|
||||||
height = doc.clientHeight
|
height = doc.clientHeight
|
||||||
{posts} = Unread
|
{posts} = Unread
|
||||||
@ -142,7 +143,7 @@ Unread =
|
|||||||
Unread.lastReadPost = ID if Unread.lastReadPost < ID or !Unread.lastReadPost
|
Unread.lastReadPost = ID if Unread.lastReadPost < ID or !Unread.lastReadPost
|
||||||
Unread.saveLastReadPost()
|
Unread.saveLastReadPost()
|
||||||
Unread.readArray Unread.postsQuotingYou
|
Unread.readArray Unread.postsQuotingYou
|
||||||
Unread.update()
|
Unread.update() if e
|
||||||
|
|
||||||
saveLastReadPost: $.debounce 2 * $.SECOND, ->
|
saveLastReadPost: $.debounce 2 * $.SECOND, ->
|
||||||
return if Unread.thread.isDead
|
return if Unread.thread.isDead
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user