fix(ui): show downloaded bytes for tasks with unknown size (#1508)

This commit is contained in:
Levi authored and GitHub committed 2026-09-13 11:57:26 +08:00
1 parent 8fa9a1e902
commit 62e8ab3cef
1 file changed
+5 -1
@@ -95,7 +95,11 @@ class TaskCardFooter extends StatelessWidget {
children: [
Expanded(
child: Text(
task.total != null ? '${task.downloaded} / ${task.total}' : context.l10n.unknownSize,
task.total != null
? '${task.downloaded} / ${task.total}'
: task.downloadedBytes == 0
? context.l10n.unknownSize
: task.downloaded,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: leftColor, fontSize: 10, height: 1),