优化速度显示逻辑

This commit is contained in:
nilaoda 2022-08-23 23:12:45 +08:00
parent 91475708b7
commit e9a6e6edc8
1 changed files with 1 additions and 2 deletions

View File

@ -34,8 +34,7 @@ namespace N_m3u8DL_RE.Column
SpeedContainer.Reset(); SpeedContainer.Reset();
DateTimeString = now; DateTimeString = now;
} }
var percentage = (int)task.Percentage; var flag = task.IsFinished || !task.IsStarted;
var flag = percentage == 100 || percentage == 0;
var style = flag ? Style.Plain : MyStyle; var style = flag ? Style.Plain : MyStyle;
return flag ? new Text("-", style).Centered() : new Text(Speed, style).Centered(); return flag ? new Text("-", style).Centered() : new Text(Speed, style).Centered();
} }