(attempts = 6)
| 285 | comments.setActive(focus) |
| 286 | |
| 287 | const queueCommentFocus = (attempts = 6) => { |
| 288 | const schedule = (left: number) => { |
| 289 | requestAnimationFrame(() => { |
| 290 | comments.setFocus({ ...focus }) |
| 291 | if (left <= 0) return |
| 292 | requestAnimationFrame(() => { |
| 293 | const current = comments.focus() |
| 294 | if (!current) return |
| 295 | if (current.file !== focus.file || current.id !== focus.id) return |
| 296 | schedule(left - 1) |
| 297 | }) |
| 298 | }) |
| 299 | } |
| 300 | |
| 301 | schedule(attempts) |
| 302 | } |
| 303 | |
| 304 | const wantsReview = item.commentOrigin === "review" || (item.commentOrigin !== "file" && commentInReview(item.path)) |
| 305 | if (wantsReview) { |
no test coverage detected