From e7ec875a32fcafb7ffaae0a912d275f76a34472e Mon Sep 17 00:00:00 2001 From: tigerenwork Date: Tue, 11 Aug 2026 23:07:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E8=AE=A1=E6=95=B0=E8=B7=9F=E9=9A=8F=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=AD=9B=E9=80=89=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/app/app.component.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index fba18ab..600dff6 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -185,19 +185,17 @@ export class AppComponent implements OnInit { get folderNavs(): { name: string; count: number }[] { const counts = new Map(); - const bump = (dl: Download) => { - const key = dl.folder || ''; + for (const { value } of this.statusEntries(this.status)) { + const key = value.folder || ''; counts.set(key, (counts.get(key) || 0) + 1); - }; - this.downloads.queue.forEach(bump); - this.downloads.done.forEach(bump); + } return Array.from(counts.entries()) .map(([name, count]) => ({ name, count })) .sort((a, b) => a.name.localeCompare(b.name, 'zh')); } get allCount(): number { - return this.downloads.queue.size + this.downloads.done.size; + return this.statusEntries(this.status).length; } get folderName(): string {