fix: download status

This commit is contained in:
xkeyC
2025-12-05 17:40:45 +08:00
parent 39ddea7254
commit 53ffab783f
5 changed files with 36 additions and 14 deletions

View File

@@ -234,4 +234,19 @@ class DownloadTaskInfo {
}
/// Download task status
enum DownloadTaskStatus { initializing, live, paused, error, finished }
enum DownloadTaskStatus {
/// Checking/verifying existing files
checking,
/// Actively downloading
live,
/// Paused
paused,
/// Error occurred
error,
/// Download completed
finished,
}

View File

@@ -41,7 +41,7 @@ final class DownloadManagerProvider
}
}
String _$downloadManagerHash() => r'95a8105bb544c8a1996f321e1d0258c41e18effa';
String _$downloadManagerHash() => r'f12d3fb1d7c03fdfccff7d07903218f38a860437';
abstract class _$DownloadManager extends $Notifier<DownloadManagerState> {
DownloadManagerState build();

View File

@@ -131,8 +131,8 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
switch (status) {
case DownloadTaskStatus.live:
return "live";
case DownloadTaskStatus.initializing:
return "initializing";
case DownloadTaskStatus.checking:
return "checking";
case DownloadTaskStatus.paused:
return "paused";
case DownloadTaskStatus.error:
@@ -191,7 +191,7 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
case DownloadTaskStatus.live:
activeTasks.add(task);
break;
case DownloadTaskStatus.initializing:
case DownloadTaskStatus.checking:
case DownloadTaskStatus.paused:
waitingTasks.add(task);
break;