From 1fc3d3a1fe9f585f32ec7b78248ef55e27b64d6d Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Sat, 13 Jul 2024 19:40:56 +0800 Subject: [PATCH] fix --- server/activity.go | 2 +- ui/lib/widgets/progress_indicator.dart | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/activity.go b/server/activity.go index a75ea92..f991b82 100644 --- a/server/activity.go +++ b/server/activity.go @@ -23,7 +23,7 @@ func (s *Server) GetAllActivities(c *gin.Context) (interface{}, error) { History: h, } for id, task := range s.tasks { - if h.ID == id { + if h.ID == id && task.Exists() { a.Progress = task.Progress() } if h.ID == id && task.Processing { diff --git a/ui/lib/widgets/progress_indicator.dart b/ui/lib/widgets/progress_indicator.dart index e93ca26..93f0372 100644 --- a/ui/lib/widgets/progress_indicator.dart +++ b/ui/lib/widgets/progress_indicator.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; class MyProgressIndicator extends StatelessWidget { - double size; - Color? color; - double? value; + final double size; + final Color? color; + final double? value; - MyProgressIndicator({super.key, this.size = 30, this.color, this.value}); + const MyProgressIndicator({super.key, this.size = 30, this.color, this.value}); @override Widget build(BuildContext context) { return Center(