Corrected some logic problems...

4 storing:
  - Array in Memory Global state.todos
  - Array temporary filtered arr_todos
  - IndexedDb
  - Database
This commit is contained in:
Paolo Arena
2019-02-15 01:25:44 +01:00
parent 1af2c86067
commit cd0ec40441
11 changed files with 198 additions and 132 deletions

View File

@@ -137,7 +137,7 @@ if (workbox) {
if (data) {
if (data.todos) {
console.log('***********************+++++++++++++++++++++++++++++++++++++++++++++++++++********** Records TODOS Received from Server [', data.todos.length, 'record]', data.todos)
for (const key in data.todos) {
for (let key in data.todos) {
await writeData('todos', data.todos[key])
}
}
@@ -506,7 +506,9 @@ self.addEventListener('push', function (event) {
badge: '/statics/icons/android-chrome-192x192.png',
data: {
url: data.url
}
},
tag: 'received',
renitify: true, // vibrate also with others messages.
};
event.waitUntil(