diff --git a/src/components/home/navigation.vue b/src/components/home/navigation.vue index 07be48e0..2e594771 100644 --- a/src/components/home/navigation.vue +++ b/src/components/home/navigation.vue @@ -124,7 +124,7 @@ @@ -159,6 +159,7 @@ import {useEventListener} from '@vueuse/core' import type {IList} from '@/modelTypes/IList' import type {INamespace} from '@/modelTypes/INamespace' import ColorBubble from '@/components/misc/colorBubble.vue' +import {useListStore} from '@/stores/lists' const drag = ref(false) const dragOptions = { @@ -195,15 +196,7 @@ const namespaceListsCount = computed(() => { useEventListener('resize', resize) onMounted(() => resize()) - -function toggleFavoriteList(list: IList) { - // The favorites pseudo list is always favorite - // Archived lists cannot be marked favorite - if (list.id === -1 || list.isArchived) { - return - } - store.dispatch('lists/toggleListFavorite', list) -} +const listStore = useListStore() function resize() { // Hide the menu by default on mobile @@ -268,7 +261,7 @@ async function saveListPosition(e: SortableEvent) { try { // create a copy of the list in order to not violate vuex mutations - await store.dispatch('lists/updateList', { + await listStore.updateList({ ...list, position, namespaceId, diff --git a/src/components/list/partials/list-card.vue b/src/components/list/partials/list-card.vue index f2a8b4eb..99da97ee 100644 --- a/src/components/list/partials/list-card.vue +++ b/src/components/list/partials/list-card.vue @@ -24,7 +24,7 @@ @@ -37,7 +37,6 @@