Skip to content

Commit

Permalink
🐛 No role selected by default
Browse files Browse the repository at this point in the history
  • Loading branch information
homostellaris committed Jul 29, 2024
1 parent 4c6c777 commit 79892d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export const Important = () => {
const importantList = await db.lists.get('#important')
return (await db.todos.bulkGet(importantList?.order || [])).filter(
todo => matchesQuery(query, todo!) && inActiveStarRoles(todo!),
)
) as Todo[]
}, [inActiveStarRoles, query])

const [present] = useTodoActionSheet()
Expand Down
2 changes: 1 addition & 1 deletion components/view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function ViewProvider({ children }: { children: React.ReactNode }) {
if (!starRoles) return
/* In the rare event that a star role is added or removed we're happy to reset the state because
it's not clear whether the user would want the new star role to be active or not. */
setActiveStarRoles(starRoles.map(({ id }) => id))
setActiveStarRoles([...starRoles.map(({ id }) => id), ''])
}, [starRoles])
const allStarRolesActive = activeStarRoles.length === (starRoles?.length || 0)
const inActiveStarRoles = useCallback(
Expand Down

0 comments on commit 79892d2

Please sign in to comment.