Skip to content

Commit

Permalink
πŸ› Fix important todo reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
homostellaris committed Jul 27, 2024
1 parent e6034ce commit 4c6c777
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions components/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -558,11 +558,9 @@ export const Important = () => {
const todos = useLiveQuery(async () => {
console.debug('re-running important query')
const importantList = await db.lists.get('#important')
return db.todos
.where('id')
.anyOf(importantList!.order)
.and(todo => matchesQuery(query, todo) && inActiveStarRoles(todo))
.toArray()
return (await db.todos.bulkGet(importantList?.order || [])).filter(
todo => matchesQuery(query, todo!) && inActiveStarRoles(todo!),
)
}, [inActiveStarRoles, query])

const [present] = useTodoActionSheet()
Expand Down

0 comments on commit 4c6c777

Please sign in to comment.