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() {
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user