File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,13 @@ class GoogleTasksBackendExtension extends TaskBackend {
164164
165165 // Get tasks from all lists in parallel
166166 if ( resourceTypes . includes ( 'tasks' ) ) {
167+ // Only fetch completed tasks from the last 24 hours to avoid hitting the 100-task limit
168+ const completedMin = new Date ( Date . now ( ) - 24 * 60 * 60 * 1000 ) . toISOString ( )
169+
167170 const taskPromises = this . data . tasklists . map (
168171 async ( tasklist ) => {
169172 const data = await this . apiRequest (
170- `/lists/${ tasklist . id } /tasks?showCompleted=true&showHidden=true&showAssigned=true&maxResults=100`
173+ `/lists/${ tasklist . id } /tasks?showCompleted=true&showHidden=true&showAssigned=true&maxResults=100&completedMin= ${ encodeURIComponent ( completedMin ) } `
171174 )
172175 // Add tasklist info to each task
173176 return ( data . items || [ ] ) . map ( ( task ) => ( {
You can’t perform that action at this time.
0 commit comments