🐛 (sync) init sync if online
This commit is contained in:
@@ -50,7 +50,12 @@ class CouchService {
|
||||
this.cancelSync()
|
||||
})
|
||||
}
|
||||
|
||||
if (navigator.onLine) {
|
||||
this.initLive()
|
||||
}
|
||||
}
|
||||
|
||||
public async initLive(): Promise<boolean> {
|
||||
if (!this.db) {
|
||||
return false
|
||||
|
||||
@@ -54,6 +54,7 @@ class QueueNotifService {
|
||||
this.queue.push(notif)
|
||||
if (this.callback) {
|
||||
this.queue.forEach(this.callback)
|
||||
this.queue = []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user