fixed toast spam #29
This commit is contained in:
parent
5a9594074e
commit
b7ab487fac
@ -17,9 +17,16 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
*/
|
||||
apiOnline = true
|
||||
lastMessageShown = new Date()
|
||||
everShown = false
|
||||
async function doPing(){
|
||||
out = setTimeout(function(){
|
||||
if (everShown && new Date() - lastMessageShown < 90000){
|
||||
return
|
||||
}
|
||||
everShown = true
|
||||
if (apiOnline){
|
||||
lastMessageShown = new Date()
|
||||
PNotify.notice('Connection lost with API server')
|
||||
}
|
||||
apiOnline = false
|
||||
|
Loading…
Reference in New Issue
Block a user