Sort completed subtasks to bottom of list
Fixes #12: completed subtasks now sort after uncompleted ones, keeping actionable items at the top. Applied to both task detail view and home screen widget. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fa037e9eef
commit
054efd14ed
2 changed files with 2 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ export async function getSubtasks(parentId: string) {
|
|||
.select()
|
||||
.from(tasks)
|
||||
.where(eq(tasks.parentId, parentId))
|
||||
.orderBy(asc(tasks.position));
|
||||
.orderBy(asc(tasks.completed), asc(tasks.position));
|
||||
}
|
||||
|
||||
export async function getTaskById(id: string) {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export async function syncWidgetData(): Promise<void> {
|
|||
.select({ id: tasks.id, title: tasks.title, completed: tasks.completed })
|
||||
.from(tasks)
|
||||
.where(eq(tasks.parentId, task.id))
|
||||
.orderBy(asc(tasks.position));
|
||||
.orderBy(asc(tasks.completed), asc(tasks.position));
|
||||
task.subtasks = subs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue