fix: setting list background in store #1616

Merged
konrad merged 4 commits from fix/list-background-store into main 2022-03-27 21:06:30 +00:00

4 Commits

Author SHA1 Message Date
kolaente 627d92d5d4
fix: forgotten import
continuous-integration/drone/pr Build is passing Details
2022-03-27 22:40:23 +02:00
kolaente db2005658c
fix: lint
continuous-integration/drone/pr Build was killed Details
2022-03-27 22:38:59 +02:00
kolaente 063a17e5ee
fix: setting the last viewed list after navigating away from it
The new list background was set on the home page when navigating to the list. This was because the `CURRENT_LIST` was set to the last visited list, even after the call to `this.$store.commit(CURRENT_LIST, null)` because everything is async. I tracked the problem down to the call to `watchEffect` in the ListWrapper component. Apparently, `watchEffect` is called every time _the watched variable is assigned to_ and not only when it changes. When navigating away from the list, that watcher is getting called with the list id, the one already loaded, and sets it in store which in turn overrides the call from the contentAuth component.
2022-03-27 22:38:56 +02:00
kolaente c232be47c8
fix: make sure a list background is set in store when adding one
When creating a new list, setting a background and then navigating to the home page, the list background would not be shown in the list card. Now, we're setting the newly updated list with all its background information properly in store (why are there even multiple places for this?).
2022-03-27 22:38:14 +02:00