This commit is contained in:
My-Responsitories
2026-01-07 15:01:13 +08:00
parent 678cc919c7
commit a575fc7627
8 changed files with 52 additions and 47 deletions

View File

@@ -145,7 +145,7 @@ class DetailItem extends StatelessWidget {
final curDownload = downloadService.curDownload.value;
if (curDownload != null &&
curDownload.cid == cid &&
curDownload.status!.index <= 3) {
curDownload.status.isDownloading) {
downloadService.cancelDownload(
isDelete: false,
downloadNext: false,
@@ -352,7 +352,7 @@ class DetailItem extends StatelessWidget {
? theme.colorScheme.primary
: theme.colorScheme.outline;
return progressWidget(
statusMsg: status!.message,
statusMsg: status.message,
progressStr:
status ==
DownloadStatus
@@ -385,7 +385,7 @@ class DetailItem extends StatelessWidget {
}
Widget entryProgress(ThemeData theme) => progressWidget(
statusMsg: entry.status?.message ?? '暂停中',
statusMsg: entry.status.message,
progressStr: entry.totalBytes == 0
? ''
: '${CacheManager.formatSize(entry.downloadedBytes)}/${CacheManager.formatSize(entry.totalBytes)}',