(scheduledForTaskListId: string)
| 152 | } |
| 153 | |
| 154 | #onHideTimerFired(scheduledForTaskListId: string): void { |
| 155 | this.#hideTimer = null |
| 156 | // Bail if the task list ID changed since scheduling (team created/deleted |
| 157 | // during the 5s window) — don't reset the wrong list. |
| 158 | const currentId = getTaskListId() |
| 159 | if (currentId !== scheduledForTaskListId) return |
| 160 | // Verify all tasks are still completed before clearing |
| 161 | void listTasks(currentId).then(async tasksToCheck => { |
| 162 | const allStillCompleted = |
| 163 | tasksToCheck.length > 0 && |
| 164 | tasksToCheck.every(t => t.status === 'completed') |
| 165 | if (allStillCompleted) { |
| 166 | await resetTaskList(currentId) |
| 167 | this.#tasks = [] |
| 168 | this.#hidden = true |
| 169 | } |
| 170 | this.#notify() |
| 171 | }) |
| 172 | } |
| 173 | |
| 174 | #clearHideTimer(): void { |
| 175 | if (this.#hideTimer) { |
nothing calls this directly
no test coverage detected