fix: ask updated dbLoadTodo (if something to process) only when is connected...
This commit is contained in:
@@ -128,7 +128,6 @@ namespace Actions {
|
||||
|
||||
let promiseChain = Promise.resolve()
|
||||
|
||||
something = true
|
||||
for (let rec of arr_recmsg) {
|
||||
// console.log(' .... sw.sync.register ( ', rec._id)
|
||||
// if ('SyncManager' in window) {
|
||||
@@ -138,6 +137,9 @@ namespace Actions {
|
||||
// #Alternative to SyncManager
|
||||
promiseChain = promiseChain.then(() => {
|
||||
return Api.syncAlternative(rec._id)
|
||||
.then(() => {
|
||||
something = true
|
||||
})
|
||||
})
|
||||
|
||||
// }
|
||||
@@ -166,6 +168,7 @@ namespace Actions {
|
||||
return sendSwMsgIfAvailable()
|
||||
.then(something => {
|
||||
if (something) {
|
||||
console.log('something')
|
||||
// Refresh data
|
||||
return waitAndRefreshData(context)
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace Actions {
|
||||
|
||||
Mutations.mutations.setServerCode(rescodes.CALLING)
|
||||
|
||||
let myres: IResult
|
||||
let myres: any
|
||||
|
||||
return Api.SendReq(call, 'POST', usertosend, true)
|
||||
.then(({ res, body }) => {
|
||||
|
||||
Reference in New Issue
Block a user