Start desktop notification closing timeout only after they appeared.
This commit is contained in:
parent
386888e4d1
commit
5c36d646a5
@ -104,9 +104,10 @@ Unread =
|
|||||||
notif.onclick = ->
|
notif.onclick = ->
|
||||||
Header.scrollToPost post.nodes.root
|
Header.scrollToPost post.nodes.root
|
||||||
window.focus()
|
window.focus()
|
||||||
setTimeout ->
|
notif.onshow = ->
|
||||||
notif.close()
|
setTimeout ->
|
||||||
, 7 * $.SECOND
|
notif.close()
|
||||||
|
, 7 * $.SECOND
|
||||||
|
|
||||||
onUpdate: (e) ->
|
onUpdate: (e) ->
|
||||||
if e.detail[404]
|
if e.detail[404]
|
||||||
|
|||||||
@ -122,10 +122,11 @@ QR =
|
|||||||
# Firefox automatically closes notifications
|
# Firefox automatically closes notifications
|
||||||
# so we can't control the onclose properly.
|
# so we can't control the onclose properly.
|
||||||
notif.onclose = -> notice.close()
|
notif.onclose = -> notice.close()
|
||||||
setTimeout ->
|
notif.onshow = ->
|
||||||
notif.onclose = null
|
setTimeout ->
|
||||||
notif.close()
|
notif.onclose = null
|
||||||
, 7 * $.SECOND
|
notif.close()
|
||||||
|
, 7 * $.SECOND
|
||||||
<% } %>
|
<% } %>
|
||||||
notifications: []
|
notifications: []
|
||||||
cleanNotifications: ->
|
cleanNotifications: ->
|
||||||
@ -1108,9 +1109,10 @@ QR =
|
|||||||
QR.open()
|
QR.open()
|
||||||
QR.captcha.nodes.input.focus()
|
QR.captcha.nodes.input.focus()
|
||||||
window.focus()
|
window.focus()
|
||||||
setTimeout ->
|
notif.onshow = ->
|
||||||
notif.close()
|
setTimeout ->
|
||||||
, 7 * $.SECOND
|
notif.close()
|
||||||
|
, 7 * $.SECOND
|
||||||
|
|
||||||
unless Conf['Persistent QR'] or QR.cooldown.auto
|
unless Conf['Persistent QR'] or QR.cooldown.auto
|
||||||
QR.close()
|
QR.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user