Fix too much checks for messages

This commit is contained in:
pietervdvn 2021-07-27 19:35:19 +02:00
parent 887f298bd8
commit 9248f264f1

View file

@ -249,8 +249,13 @@ export class OsmConnection {
});
}
private isChecking = false;
private CheckForMessagesContinuously(){
const self =this;
if(this.isChecking){
return;
}
this.isChecking = true;
UIEventSource.Chronic(5 * 60 * 1000).addCallback(_ => {
if (self.isLoggedIn .data) {
console.log("Checking for messages")