Fix: Todo Multi refresh ...
fix some promises problem
This commit is contained in:
@@ -363,7 +363,7 @@ export default class Todo extends Vue {
|
|||||||
async load() {
|
async load() {
|
||||||
|
|
||||||
|
|
||||||
this.todos_arr = [...Todos.state.todos]
|
// this.todos_arr = [...Todos.state.todos]
|
||||||
|
|
||||||
// Set last category selected
|
// Set last category selected
|
||||||
localStorage.setItem(rescodes.localStorage.categorySel, this.getCategory())
|
localStorage.setItem(rescodes.localStorage.categorySel, this.getCategory())
|
||||||
@@ -380,11 +380,6 @@ export default class Todo extends Vue {
|
|||||||
|
|
||||||
this.checkUpdate_everytime()
|
this.checkUpdate_everytime()
|
||||||
|
|
||||||
/*
|
|
||||||
this.todos_arr.forEach((elem, index) => {
|
|
||||||
this.logelem('LOAD ' + index, elem)
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.loadDone = true
|
this.loadDone = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,16 +183,16 @@ namespace Actions {
|
|||||||
let options = null
|
let options = null
|
||||||
|
|
||||||
// If is not already stored in DB, then show the message to the user.
|
// If is not already stored in DB, then show the message to the user.
|
||||||
// if (!state.wasAlreadySubscribed) {
|
if (!state.wasAlreadySubscribed) {
|
||||||
options = {
|
options = {
|
||||||
title: translate('notification.title_subscribed'),
|
title: translate('notification.title_subscribed'),
|
||||||
content: translate('notification.subscribed'),
|
content: translate('notification.subscribed'),
|
||||||
openUrl: '/'
|
openUrl: '/'
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
let myres = {
|
let myres = {
|
||||||
options: { ...options },
|
options,
|
||||||
subs: newSub,
|
subs: newSub,
|
||||||
others: {
|
others: {
|
||||||
userId: UserStore.state.userId,
|
userId: UserStore.state.userId,
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ namespace Actions {
|
|||||||
// console.log('******* UPDATE TODOS.STATE.TODOS !:', res.todos)
|
// console.log('******* UPDATE TODOS.STATE.TODOS !:', res.todos)
|
||||||
if (body.todos) {
|
if (body.todos) {
|
||||||
state.todos = [...body.todos]
|
state.todos = [...body.todos]
|
||||||
Todos.mutations.setTodos_changed()
|
// Todos.mutations.setTodos_changed()
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('********** res', 'state.todos', state.todos, 'checkPending', checkPending)
|
console.log('********** res', 'state.todos', state.todos, 'checkPending', checkPending)
|
||||||
|
|||||||
Reference in New Issue
Block a user