1
0

feat: move list store to pina (#2392)

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/2392
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
Dominik Pschenitschni
2022-09-21 16:21:25 +00:00
committed by konrad
parent f85a08afb4
commit a38075f376
23 changed files with 272 additions and 239 deletions

View File

@ -71,10 +71,12 @@ import {getHistory} from '@/modules/listHistory'
import {parseDateOrNull} from '@/helpers/parseDateOrNull'
import {formatDateShort, formatDateSince} from '@/helpers/time/formatDate'
import {useDateTimeSalutation} from '@/composables/useDateTimeSalutation'
import {useListStore} from '@/stores/lists'
const welcome = useDateTimeSalutation()
const store = useStore()
const listStore = useListStore()
const listHistory = computed(() => {
// If we don't check this, it tries to load the list background right after logging out
if(!store.state.auth.authenticated) {
@ -82,7 +84,7 @@ const listHistory = computed(() => {
}
return getHistory()
.map(l => store.getters['lists/getListById'](l.id))
.map(l => listStore.getListById(l.id))
.filter(l => l !== null)
})