Don't reset the inactive counter when we focus OUT of a tab. derp
This commit is contained in:
parent
7646eaa186
commit
05cb2fcd3c
@ -2877,6 +2877,12 @@
|
|||||||
}
|
}
|
||||||
$.add(d.body, dialog);
|
$.add(d.body, dialog);
|
||||||
return $.on(d, 'visibilitychange ovisibilitychange mozvisibilitychange webkitvisibilitychange', function() {
|
return $.on(d, 'visibilitychange ovisibilitychange mozvisibilitychange webkitvisibilitychange', function() {
|
||||||
|
var state;
|
||||||
|
state = d.visibilityState || d.oVisibilityState || d.mozVisibilityState || d.webkitVisibilityState;
|
||||||
|
if (state !== 'visible') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.log(state);
|
||||||
Updater.unsuccessfulFetchCount = 0;
|
Updater.unsuccessfulFetchCount = 0;
|
||||||
if (Updater.timer.textContent < -Conf['Interval']) {
|
if (Updater.timer.textContent < -Conf['Interval']) {
|
||||||
return Updater.timer.textContent = -Updater.getInterval();
|
return Updater.timer.textContent = -Updater.getInterval();
|
||||||
|
|||||||
@ -2306,6 +2306,8 @@ Updater =
|
|||||||
$.add d.body, dialog
|
$.add d.body, dialog
|
||||||
|
|
||||||
$.on d, 'visibilitychange ovisibilitychange mozvisibilitychange webkitvisibilitychange', ->
|
$.on d, 'visibilitychange ovisibilitychange mozvisibilitychange webkitvisibilitychange', ->
|
||||||
|
state = d.visibilityState or d.oVisibilityState or d.mozVisibilityState or d.webkitVisibilityState
|
||||||
|
return if state isnt 'visible'
|
||||||
# Reset the counter when we focus this tab.
|
# Reset the counter when we focus this tab.
|
||||||
Updater.unsuccessfulFetchCount = 0
|
Updater.unsuccessfulFetchCount = 0
|
||||||
if Updater.timer.textContent < -Conf['Interval']
|
if Updater.timer.textContent < -Conf['Interval']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user