(path)
| 1304 | const task = renderQueue[i]; |
| 1305 | if (task && task.filePath === filePath && !task.retainDetached) return task; |
| 1306 | } |
| 1307 | return null; |
| 1308 | } |
| 1309 | |
| 1310 | /** |
| 1311 | * Re-queue thumbnail work for an on-screen cell that still shows the placeholder. |
| 1312 | * Virtual-grid keeps existing DOM nodes across scroll frames, so pruned/soft-capped |
| 1313 | * jobs would otherwise never start again until the cell is destroyed and recreated. |
| 1314 | */ |
| 1315 | function ensureVisibleThumbnailQueued(itemEl, model, thumbPriority) { |
| 1316 | if (window._serverBulkThumbnailJobActive) return false; |
| 1317 | if (!itemEl || !model || !model.filePath) return false; |
| 1318 | if (model.hasThumbnail) return false; |
| 1319 | if (hasImageOnlyPreviewMiss(model.filePath)) return false; |
| 1320 | |
| 1321 | const thumbContainer = itemEl.querySelector('.thumbnail-container'); |
| 1322 | if (!thumbContainer) return false; |
| 1323 | const img = thumbContainer.querySelector('img'); |
| 1324 | if (img && typeof img.src === 'string' && img.src.startsWith('data:image')) return false; |
| 1325 | |
| 1326 | const queued = findQueuedThumbnailTask(model.filePath); |
| 1327 | if (queued) { |
no outgoing calls
no test coverage detected