mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
fix(Downloads): sort active downloads by progress descending
Items actively downloading now appear at the top of the download list instead of the bottom. Sorts by progress percentage descending so the item furthest along is always first, and queued items (0%) are last. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
711bd07f7b
commit
c2b6e079af
|
|
@ -37,6 +37,9 @@ export class DownloadService {
|
|||
const allDownloads = [...fileDownloads, ...modelDownloads]
|
||||
|
||||
// Filter by filetype if specified
|
||||
return allDownloads.filter((job) => !filetype || job.filetype === filetype)
|
||||
const filtered = allDownloads.filter((job) => !filetype || job.filetype === filetype)
|
||||
|
||||
// Sort so actively downloading items (progress > 0) appear first, then by progress descending
|
||||
return filtered.sort((a, b) => b.progress - a.progress)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user