diff --git a/4chan_x.user.js b/4chan_x.user.js index a3b2eba99..88fcde9e2 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1969,6 +1969,9 @@ } else { qr.close(); } + if (g.REPLY && (conf['Unread Count'] || conf['Unread Favicon'])) { + unread.foresee.push(postNumber); + } if (g.REPLY && conf['Thread Updater'] && conf['Auto Update This']) { updater.update(); } @@ -3438,7 +3441,13 @@ return g.callbacks.push(this.node); }, replies: [], + foresee: [], node: function(post) { + var index; + if ((index = unread.foresee.indexOf(post.id)) !== -1) { + unread.foresee.splice(index, 1); + return; + } if (post.root.hidden || post["class"]) return; unread.replies.push(post.root); return unread.update(); diff --git a/changelog b/changelog index 3367194a7..ec713707f 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ master - Mayhem General performance improvements. Threads will now be updated instantly after posting through the QR. + Your own posts will not count toward the unread count after posting through the QR. - noface Add unique ID to filter. diff --git a/script.coffee b/script.coffee index 024d691cc..1b8919933 100644 --- a/script.coffee +++ b/script.coffee @@ -1602,6 +1602,8 @@ qr = else qr.close() + if g.REPLY and (conf['Unread Count'] or conf['Unread Favicon']) + unread.foresee.push postNumber if g.REPLY and conf['Thread Updater'] and conf['Auto Update This'] updater.update() @@ -2785,8 +2787,12 @@ unread = g.callbacks.push @node replies: [] + foresee: [] node: (post) -> + if (index = unread.foresee.indexOf post.id) isnt -1 + unread.foresee.splice index, 1 + return return if post.root.hidden or post.class unread.replies.push post.root unread.update()