Change: use status field as primary queue detail (#6859)
Docker CI / Docker Build & Push (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled

This commit is contained in:
shamoon
2026-07-10 22:48:22 -07:00
committed by GitHub
parent 4755388112
commit 9b1726be9c
8 changed files with 174 additions and 47 deletions
+4 -4
View File
@@ -36,8 +36,8 @@ const widget = {
status: entry.status,
}))
.sort((a, b) => {
const downloadingA = a.trackedDownloadState === "downloading";
const downloadingB = b.trackedDownloadState === "downloading";
const downloadingA = (a.status ?? a.trackedDownloadState) === "downloading";
const downloadingB = (b.status ?? b.trackedDownloadState) === "downloading";
if (downloadingA && !downloadingB) {
return -1;
}
@@ -45,8 +45,8 @@ const widget = {
return 1;
}
const percentA = a.sizeLeft / a.size;
const percentB = b.sizeLeft / b.size;
const percentA = a.size > 0 ? a.sizeLeft / a.size : 1;
const percentB = b.size > 0 ? b.sizeLeft / b.size : 1;
if (percentA < percentB) {
return -1;
}