Compare commits

...

2 Commits

Author SHA1 Message Date
Administrator
68e05503f6 release: v2.0.4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 05:25:33 +01:00
Administrator
3d8979797c fix: queue table not updating during uploads (virtual scrolling bug)
The in-place update path for virtual scrolling would silently skip the
full DOM rebuild when row IDs didn't match due to sort order changes.
The break statement only exited the for-loop but return still fired,
preventing any update. Now tracks allMatch flag and falls through to
innerHTML rebuild when needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 05:25:22 +01:00
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "multi-hoster-uploader", "name": "multi-hoster-uploader",
"version": "2.0.3", "version": "2.0.4",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -850,12 +850,13 @@ function _renderVirtualRows(tbody) {
if (startIdx === _lastVisibleRange.start && endIdx === _lastVisibleRange.end) { if (startIdx === _lastVisibleRange.start && endIdx === _lastVisibleRange.end) {
const rows = tbody.querySelectorAll('.queue-row'); const rows = tbody.querySelectorAll('.queue-row');
if (rows.length === endIdx - startIdx) { if (rows.length === endIdx - startIdx) {
let allMatch = true;
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
const job = _sortedJobsCache[startIdx + i]; const job = _sortedJobsCache[startIdx + i];
if (rows[i].dataset.jobId !== job.id) { break; } // identity mismatch, full rebuild below if (rows[i].dataset.jobId !== job.id) { allMatch = false; break; }
_updateRowInPlace(rows[i], job); _updateRowInPlace(rows[i], job);
} }
return; if (allMatch) return; // all rows updated in-place, no rebuild needed
} }
} }
_lastVisibleRange = { start: startIdx, end: endIdx }; _lastVisibleRange = { start: startIdx, end: endIdx };