🐛 (sync) init sync if online

This commit is contained in:
2020-08-25 20:58:56 +02:00
parent 5191d2e32c
commit e974facc28
2 changed files with 6 additions and 0 deletions

View File

@@ -50,7 +50,12 @@ class CouchService {
this.cancelSync() this.cancelSync()
}) })
} }
if (navigator.onLine) {
this.initLive()
}
} }
public async initLive(): Promise<boolean> { public async initLive(): Promise<boolean> {
if (!this.db) { if (!this.db) {
return false return false

View File

@@ -54,6 +54,7 @@ class QueueNotifService {
this.queue.push(notif) this.queue.push(notif)
if (this.callback) { if (this.callback) {
this.queue.forEach(this.callback) this.queue.forEach(this.callback)
this.queue = []
} }
} }
} }