diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index a0525625e..938550122 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -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) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 040be83ad..d0bb4551b 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -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) { diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 4317502b5..4ee9e6f90 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -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