Fix: Todo Multi refresh ...

fix some promises problem
This commit is contained in:
Paolo Arena
2019-02-14 19:01:32 +01:00
parent 6931d57005
commit bfa8a48211
3 changed files with 5 additions and 10 deletions

View File

@@ -363,7 +363,7 @@ export default class Todo extends Vue {
async load() {
this.todos_arr = [...Todos.state.todos]
// this.todos_arr = [...Todos.state.todos]
// Set last category selected
localStorage.setItem(rescodes.localStorage.categorySel, this.getCategory())
@@ -380,11 +380,6 @@ export default class Todo extends Vue {
this.checkUpdate_everytime()
/*
this.todos_arr.forEach((elem, index) => {
this.logelem('LOAD ' + index, elem)
})
*/
this.loadDone = true
}

View File

@@ -183,16 +183,16 @@ namespace Actions {
let options = null
// If is not already stored in DB, then show the message to the user.
// if (!state.wasAlreadySubscribed) {
if (!state.wasAlreadySubscribed) {
options = {
title: translate('notification.title_subscribed'),
content: translate('notification.subscribed'),
openUrl: '/'
}
// }
}
let myres = {
options: { ...options },
options,
subs: newSub,
others: {
userId: UserStore.state.userId,

View File

@@ -201,7 +201,7 @@ namespace Actions {
// console.log('******* UPDATE TODOS.STATE.TODOS !:', res.todos)
if (body.todos) {
state.todos = [...body.todos]
Todos.mutations.setTodos_changed()
// Todos.mutations.setTodos_changed()
}
console.log('********** res', 'state.todos', state.todos, 'checkPending', checkPending)