forked from MapComplete/MapComplete
Fix too much checks for messages
This commit is contained in:
parent
887f298bd8
commit
9248f264f1
1 changed files with 5 additions and 0 deletions
|
@ -249,8 +249,13 @@ export class OsmConnection {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private isChecking = false;
|
||||||
private CheckForMessagesContinuously(){
|
private CheckForMessagesContinuously(){
|
||||||
const self =this;
|
const self =this;
|
||||||
|
if(this.isChecking){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isChecking = true;
|
||||||
UIEventSource.Chronic(5 * 60 * 1000).addCallback(_ => {
|
UIEventSource.Chronic(5 * 60 * 1000).addCallback(_ => {
|
||||||
if (self.isLoggedIn .data) {
|
if (self.isLoggedIn .data) {
|
||||||
console.log("Checking for messages")
|
console.log("Checking for messages")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue