From 1749d6ba0abe413e3149e823fb9f77cb41425d53 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 31 Jan 2023 17:12:11 +0100 Subject: [PATCH] fix(list): make sure favorite lists are not duplicated in the menu when renaming them Resolves https://kolaente.dev/vikunja/frontend/issues/3031 --- src/stores/lists.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/lists.ts b/src/stores/lists.ts index 09cdccf4cd..17db4debf2 100644 --- a/src/stores/lists.ts +++ b/src/stores/lists.ts @@ -124,10 +124,10 @@ export const useListStore = defineStore('list', () => { ...list, namespaceId: FavoriteListsNamespace, } + + namespaceStore.removeListFromNamespaceById(newList) if (list.isFavorite) { namespaceStore.addListToNamespace(newList) - } else { - namespaceStore.removeListFromNamespaceById(newList) } namespaceStore.loadNamespacesIfFavoritesDontExist() namespaceStore.removeFavoritesNamespaceIfEmpty()