The previous behavior was causing multiple notifications
on if you switched between boards too quickly
This commit is contained in:
parent
4ae16f4131
commit
1277d32161
@ -2501,7 +2501,7 @@
|
|||||||
}
|
}
|
||||||
now = Date.now();
|
now = Date.now();
|
||||||
$.ready(function() {
|
$.ready(function() {
|
||||||
return setTimeout((function() {
|
return Index.nTimeout = setTimeout((function() {
|
||||||
if (Index.req && !Index.notice) {
|
if (Index.req && !Index.notice) {
|
||||||
return Index.notice = new Notice('info', 'Refreshing index...', 2);
|
return Index.notice = new Notice('info', 'Refreshing index...', 2);
|
||||||
}
|
}
|
||||||
@ -2522,9 +2522,13 @@
|
|||||||
return $.addClass(Index.button, 'fa-spin');
|
return $.addClass(Index.button, 'fa-spin');
|
||||||
},
|
},
|
||||||
load: function(e, pageNum) {
|
load: function(e, pageNum) {
|
||||||
var err, notice, req, timeEl;
|
var err, nTimeout, notice, req, timeEl;
|
||||||
$.rmClass(Index.button, 'fa-spin');
|
$.rmClass(Index.button, 'fa-spin');
|
||||||
req = Index.req, notice = Index.notice;
|
req = Index.req, notice = Index.notice, nTimeout = Index.nTimeout;
|
||||||
|
if (nTimeout) {
|
||||||
|
clearTimeout(nTimeout);
|
||||||
|
}
|
||||||
|
delete Index.nTimeout;
|
||||||
delete Index.req;
|
delete Index.req;
|
||||||
delete Index.notice;
|
delete Index.notice;
|
||||||
if (e.type === 'abort') {
|
if (e.type === 'abort') {
|
||||||
|
|||||||
@ -2511,7 +2511,7 @@
|
|||||||
}
|
}
|
||||||
now = Date.now();
|
now = Date.now();
|
||||||
$.ready(function() {
|
$.ready(function() {
|
||||||
return setTimeout((function() {
|
return Index.nTimeout = setTimeout((function() {
|
||||||
if (Index.req && !Index.notice) {
|
if (Index.req && !Index.notice) {
|
||||||
return Index.notice = new Notice('info', 'Refreshing index...', 2);
|
return Index.notice = new Notice('info', 'Refreshing index...', 2);
|
||||||
}
|
}
|
||||||
@ -2532,9 +2532,13 @@
|
|||||||
return $.addClass(Index.button, 'fa-spin');
|
return $.addClass(Index.button, 'fa-spin');
|
||||||
},
|
},
|
||||||
load: function(e, pageNum) {
|
load: function(e, pageNum) {
|
||||||
var err, notice, req, timeEl;
|
var err, nTimeout, notice, req, timeEl;
|
||||||
$.rmClass(Index.button, 'fa-spin');
|
$.rmClass(Index.button, 'fa-spin');
|
||||||
req = Index.req, notice = Index.notice;
|
req = Index.req, notice = Index.notice, nTimeout = Index.nTimeout;
|
||||||
|
if (nTimeout) {
|
||||||
|
clearTimeout(nTimeout);
|
||||||
|
}
|
||||||
|
delete Index.nTimeout;
|
||||||
delete Index.req;
|
delete Index.req;
|
||||||
delete Index.notice;
|
delete Index.notice;
|
||||||
if (e.type === 'abort') {
|
if (e.type === 'abort') {
|
||||||
|
|||||||
@ -236,7 +236,7 @@ Index =
|
|||||||
# This notice only displays if Index Refresh is taking too long
|
# This notice only displays if Index Refresh is taking too long
|
||||||
now = Date.now()
|
now = Date.now()
|
||||||
$.ready ->
|
$.ready ->
|
||||||
setTimeout (->
|
Index.nTimeout = setTimeout (->
|
||||||
if Index.req and !Index.notice
|
if Index.req and !Index.notice
|
||||||
Index.notice = new Notice 'info', 'Refreshing index...', 2
|
Index.notice = new Notice 'info', 'Refreshing index...', 2
|
||||||
), 3 * $.SECOND - (Date.now() - now)
|
), 3 * $.SECOND - (Date.now() - now)
|
||||||
@ -252,7 +252,9 @@ Index =
|
|||||||
|
|
||||||
load: (e, pageNum) ->
|
load: (e, pageNum) ->
|
||||||
$.rmClass Index.button, 'fa-spin'
|
$.rmClass Index.button, 'fa-spin'
|
||||||
{req, notice} = Index
|
{req, notice, nTimeout} = Index
|
||||||
|
clearTimeout nTimeout if nTimeout
|
||||||
|
delete Index.nTimeout
|
||||||
delete Index.req
|
delete Index.req
|
||||||
delete Index.notice
|
delete Index.notice
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user