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