feat: save current list view just once

This commit is contained in:
Dominik Pschenitschni 2021-11-14 21:34:34 +01:00
parent 7eed0628d0
commit 29a9335844
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
5 changed files with 6 additions and 28 deletions

View file

@ -184,7 +184,7 @@
<script setup>
import { ref, reactive, computed, toRaw } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useRouter } from 'vue-router'
import ListWrapper from './ListWrapper'
import Done from '@/components/misc/Done.vue'
@ -199,7 +199,6 @@ import Pagination from '@/components/misc/pagination.vue'
import Popup from '@/components/misc/popup'
import { useTaskList } from '@/composables/taskList'
import {saveListView} from '@/helpers/saveListView'
const ACTIVE_COLUMNS_DEFAULT = {
id: true,
@ -288,11 +287,6 @@ const taskDetailRoutes = computed(() => Object.fromEntries(
])),
))
// Save the current list view to local storage
// We use local storage and not vuex here to make it persistent across reloads.
const route = useRoute()
saveListView(route.params.listId, route.name)
function sort(property) {
const order = sortBy.value[property]
if (typeof order === 'undefined' || order === 'none') {