Fix favoriting lists

This commit is contained in:
kolaente 2020-11-01 17:11:16 +01:00
parent 4fa2f08975
commit 64a2720ad0
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 147 additions and 145 deletions

View File

@ -209,15 +209,6 @@ export default {
this.$store.commit(CURRENT_LIST, {})
}
},
toggleFavoriteList(list) {
// The favorites pseudo list is always favorite
// Archived lists cannot be marked favorite
if (list.id === -1 || list.isArchived) {
return
}
this.$store.dispatch('lists/toggleListFavorite', list)
.catch(e => this.error(e, this))
},
},
}
</script>

View File

@ -154,5 +154,16 @@ export default {
background: 'background',
menuActive: MENU_ACTIVE,
}),
methods: {
toggleFavoriteList(list) {
// The favorites pseudo list is always favorite
// Archived lists cannot be marked favorite
if (list.id === -1 || list.isArchived) {
return
}
this.$store.dispatch('lists/toggleListFavorite', list)
.catch(e => this.error(e, this))
},
},
}
</script>