fix(list): make sure favorite lists are not duplicated in the menu when renaming them

Resolves vikunja/frontend#3031
This commit is contained in:
kolaente 2023-01-31 17:12:11 +01:00
parent b29008d304
commit 1749d6ba0a
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -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()