Fix Unread notifiers.
This commit is contained in:
parent
ce1086ac60
commit
f2631c9de1
@ -3478,20 +3478,21 @@
|
||||
replies: [],
|
||||
foresee: [],
|
||||
node: function(post) {
|
||||
var count, index;
|
||||
var count, el, index;
|
||||
if ((index = Unread.foresee.indexOf(post.id)) !== -1) {
|
||||
Unread.foresee.splice(index, 1);
|
||||
return;
|
||||
}
|
||||
if (post.root.hidden || post["class"]) {
|
||||
el = post.el;
|
||||
if (el.hidden) {
|
||||
return;
|
||||
}
|
||||
count = Unread.replies.push(post.el);
|
||||
count = Unread.replies.push(el);
|
||||
return Unread.update(count === 1);
|
||||
},
|
||||
scroll: function() {
|
||||
var bottom, height, i, reply, _i, _len, _ref;
|
||||
height = d.body.clientHeight;
|
||||
height = d.documentElement.clientHeight;
|
||||
_ref = Unread.replies;
|
||||
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
|
||||
reply = _ref[i];
|
||||
|
||||
@ -2691,12 +2691,14 @@ Unread =
|
||||
if (index = Unread.foresee.indexOf post.id) isnt -1
|
||||
Unread.foresee.splice index, 1
|
||||
return
|
||||
return if post.root.hidden or post.class
|
||||
count = Unread.replies.push post.el
|
||||
{el} = post
|
||||
# new HTML ???
|
||||
return if el.hidden # or inlined/OP
|
||||
count = Unread.replies.push el
|
||||
Unread.update count is 1
|
||||
|
||||
scroll: ->
|
||||
height = d.body.clientHeight
|
||||
height = d.documentElement.clientHeight
|
||||
for reply, i in Unread.replies
|
||||
{bottom} = reply.getBoundingClientRect()
|
||||
if bottom > height #post is not completely read
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user