Skip to content

Commit

Permalink
fix: sorting of tasks from different sections in today page
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasphil committed Jan 4, 2025
1 parent 83e9d2f commit ca09158
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stores/todayPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ export function useTodayPage() {
const dueItems: UpdateableItem[] = [];

page.items
.filter((item) => {
return item.dueDate && (item.dueDate as Date).getTime() <= eod;
})
.sort((a, b) => compare(a, b))
.map<UpdateableItem>((item, i) => [
removeIndent(item),
updateFn(page.id, i),
])
.sort(([a], [b]) => compare(a, b))
.filter(([item]) => {
return item.dueDate && (item.dueDate as Date).getTime() <= eod;
})
.forEach((item) => dueItems.push(item));

if (dueItems.length) {
Expand Down

0 comments on commit ca09158

Please sign in to comment.