Compare commits
No commits in common. "3d8e81560c24b11d21f42e7ab61c523d687f72f3" and "d53eea443eead69fa27aaeb8d59c3a6f86552762" have entirely different histories.
3d8e81560c
...
d53eea443e
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "multi-hoster-uploader",
|
"name": "multi-hoster-uploader",
|
||||||
"version": "2.0.1",
|
"version": "2.0.0",
|
||||||
"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": {
|
||||||
|
|||||||
@ -811,7 +811,8 @@ function renderQueueTable() {
|
|||||||
_lastVisibleRange = { start: -1, end: -1 };
|
_lastVisibleRange = { start: -1, end: -1 };
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Virtual scrolling for large queues — in-place update when range unchanged
|
// Virtual scrolling for large queues — force re-render
|
||||||
|
_lastVisibleRange = { start: -1, end: -1 };
|
||||||
_renderVirtualRows(tbody);
|
_renderVirtualRows(tbody);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -846,18 +847,8 @@ function _renderVirtualRows(tbody) {
|
|||||||
const startIdx = Math.max(0, Math.floor(scrollTop / VIRTUAL_ROW_HEIGHT) - VIRTUAL_OVERSCAN);
|
const startIdx = Math.max(0, Math.floor(scrollTop / VIRTUAL_ROW_HEIGHT) - VIRTUAL_OVERSCAN);
|
||||||
const endIdx = Math.min(totalRows, Math.ceil((scrollTop + viewportHeight) / VIRTUAL_ROW_HEIGHT) + VIRTUAL_OVERSCAN);
|
const endIdx = Math.min(totalRows, Math.ceil((scrollTop + viewportHeight) / VIRTUAL_ROW_HEIGHT) + VIRTUAL_OVERSCAN);
|
||||||
|
|
||||||
// Same range — try in-place update to avoid hover flicker
|
// Only re-render if visible range changed
|
||||||
if (startIdx === _lastVisibleRange.start && endIdx === _lastVisibleRange.end) {
|
if (startIdx === _lastVisibleRange.start && endIdx === _lastVisibleRange.end) return;
|
||||||
const rows = tbody.querySelectorAll('.queue-row');
|
|
||||||
if (rows.length === endIdx - startIdx) {
|
|
||||||
for (let i = 0; i < rows.length; i++) {
|
|
||||||
const job = _sortedJobsCache[startIdx + i];
|
|
||||||
if (rows[i].dataset.jobId !== job.id) { break; } // identity mismatch, full rebuild below
|
|
||||||
_updateRowInPlace(rows[i], job);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_lastVisibleRange = { start: startIdx, end: endIdx };
|
_lastVisibleRange = { start: startIdx, end: endIdx };
|
||||||
|
|
||||||
const topPad = startIdx * VIRTUAL_ROW_HEIGHT;
|
const topPad = startIdx * VIRTUAL_ROW_HEIGHT;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user