this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: filter by priority

+20
+7
mast-react-vite/src/App.tsx
··· 71 71 }; 72 72 }, []); 73 73 74 + // Sync newText with filterText when in filter mode and filterText changes 75 + useEffect(() => { 76 + if (currentAction === "filter" && filterText !== newText) { 77 + setNewText(filterText); 78 + } 79 + }, [filterText, currentAction]); 80 + 74 81 const parsedCommand = useMemo(() => { 75 82 try { 76 83 return commandParser.parse(
+13
mast-react-vite/src/contexts/filter-context.tsx
··· 9 9 tags?: string[]; 10 10 due?: string; 11 11 selection?: any[]; 12 + priority?: boolean; 12 13 }; 13 14 14 15 type FilterContextType = { ··· 31 32 filterProject?: string; 32 33 filterTags?: string[]; 33 34 filterDue?: string; 35 + filterPriority?: boolean; 34 36 }; 35 37 36 38 // Create a default context value ··· 82 84 if (parsed.due) { 83 85 newState.filterDue = parsed.due; 84 86 } 87 + 88 + if (parsed.priority) { 89 + newState.filterPriority = true; 90 + } 91 + 92 + console.log("Parsed filter command:", parsed); 93 + console.log("New filter state:", newState); 85 94 86 95 setFilterState(newState); 87 96 } ··· 215 224 if (filterState.filterDue && filterState.filterDue.length > 0) { 216 225 conditions.push("due = ?"); 217 226 params.push(filterState.filterDue); 227 + } 228 + 229 + if (filterState.filterPriority) { 230 + conditions.push("priority = '1'"); 218 231 } 219 232 220 233 return { conditions, params };