fix: task sorting

This commit is contained in:
2026-08-02 09:31:56 +02:00
parent 6e508547fc
commit f8f38c9197
2 changed files with 23 additions and 46 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import {
} from "@lucide/vue";
import TaskItem from "@/components/TaskItem.vue";
import ListOptions from "@/components/ListOptions.vue";
import { taskCompleted, sortTasks, newTemporaryTask } from "@/lib/tasks";
import { taskCompleted, taskSortFunction, newTemporaryTask } from "@/lib/tasks";
import { SortType } from "@/enums";
import { booleanCookieRef, enumCookieRef } from "@/lib/cookies";
import { useAlertStore } from "@/stores/alerts";
@@ -75,7 +75,7 @@ function fetchTasks(requestedList: string) {
}
function reSortTasks(update = false) {
tasks.value = sortTasks(tasks.value, sortType.value, sortReverse.value);
tasks.value.sort(taskSortFunction(sortType.value, sortReverse.value));
if (update) {
updateTitle();
if (tasks.value.length && list.value) {