This commit is contained in:
parent
28a46edcf3
commit
24f1458a73
@ -162,20 +162,8 @@ Filter =
|
|||||||
if hl
|
if hl
|
||||||
@highlights = hl
|
@highlights = hl
|
||||||
$.addClass @nodes.root, hl...
|
$.addClass @nodes.root, hl...
|
||||||
if noti
|
if noti and Unread.posts and (@ID > Unread.lastReadPost) and not QuoteYou.isYou(@)
|
||||||
if Header.areNotificationsEnabled
|
Unread.openNotification @, ' triggered a notification filter'
|
||||||
if not (Unread.posts is null)
|
|
||||||
if (@ID > Unread.lastReadPost) and not QuoteYou.isYou(@)
|
|
||||||
notif = new Notification "#{@info.nameBlock} triggered a notification filter",
|
|
||||||
body: @commentDisplay()
|
|
||||||
icon: Favicon.logo
|
|
||||||
notif.onclick = ->
|
|
||||||
Header.scrollToIfNeeded @nodes.bottom, true
|
|
||||||
window.focus()
|
|
||||||
notif.onshow = ->
|
|
||||||
setTimeout ->
|
|
||||||
notif.close()
|
|
||||||
, 7 * $.SECOND
|
|
||||||
|
|
||||||
isHidden: (post) ->
|
isHidden: (post) ->
|
||||||
!!Filter.test(post).hide
|
!!Filter.test(post).hide
|
||||||
|
|||||||
@ -124,9 +124,9 @@ Unread =
|
|||||||
Unread.openNotification post
|
Unread.openNotification post
|
||||||
return
|
return
|
||||||
|
|
||||||
openNotification: (post) ->
|
openNotification: (post, predicate=' replied to you') ->
|
||||||
return unless Header.areNotificationsEnabled
|
return unless Header.areNotificationsEnabled
|
||||||
notif = new Notification "#{post.info.nameBlock} replied to you",
|
notif = new Notification "#{post.info.nameBlock}#{predicate}",
|
||||||
body: post.commentDisplay()
|
body: post.commentDisplay()
|
||||||
icon: Favicon.logo
|
icon: Favicon.logo
|
||||||
notif.onclick = ->
|
notif.onclick = ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user