mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 16:40:32 +00:00
fix(flutter): keep waiting task progress static (#1516)
This commit is contained in:
4 files changed
+4
-4
No files matched your search
@@ -110,7 +110,7 @@ class TaskRecord {
|
||||
bool get canUpdateUrl =>
|
||||
protocol == api_task.Protocol.http && (status == TaskStatus.paused || status == TaskStatus.failed);
|
||||
|
||||
bool get isIndeterminate => status == TaskStatus.downloading && total == null;
|
||||
bool get isIndeterminate => status == TaskStatus.downloading && !waiting && total == null;
|
||||
|
||||
TaskAssetType get assetType => _assetType(name, isFolder: isFolder, protocol: protocol);
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ class _ProgressContent extends StatelessWidget {
|
||||
fillColor: fillColor,
|
||||
highlightStartColor: fillColor,
|
||||
highlightEndColor: fillColor,
|
||||
shimmer: task.status == TaskStatus.downloading,
|
||||
shimmer: task.status == TaskStatus.downloading && !task.waiting,
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
TaskCardFooter(task: task, isError: isError),
|
||||
|
||||
@@ -149,7 +149,7 @@ class _TaskCardMobileState extends State<TaskCardMobile> {
|
||||
fillColor: fillColor,
|
||||
highlightStartColor: fillColor,
|
||||
highlightEndColor: fillColor,
|
||||
shimmer: task.status == TaskStatus.downloading,
|
||||
shimmer: task.status == TaskStatus.downloading && !task.waiting,
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
TaskCardFooter(task: task, isError: task.status == TaskStatus.failed),
|
||||
|
||||
@@ -145,7 +145,7 @@ class _TaskDownloadProgress extends StatelessWidget {
|
||||
key: const ValueKey('task-files-total-progress'),
|
||||
value: progress,
|
||||
indeterminate: runtime == null && task.isIndeterminate,
|
||||
shimmer: task.status == TaskStatus.downloading,
|
||||
shimmer: task.status == TaskStatus.downloading && !task.waiting,
|
||||
height: 4,
|
||||
trackColor: palette.progressTrack,
|
||||
fillColor: palette.brandProgress,
|
||||
|
||||
Reference in new issue
Block a user