fix: incorrect file name in task files view (#285)

This commit is contained in:
Levi authored and GitHub committed 2023-12-02 18:45:16 +08:00
1 parent 16b7a3d5b3
commit 6538766780
2 files changed
+8 -5

No files matched your search

@@ -57,8 +57,9 @@ class TaskFilesView extends GetView<TaskFilesController> {
final meta = controller.task.value!.meta; final meta = controller.task.value!.meta;
final file = fileList[index]; final file = fileList[index];
// if resource is single file, use opts.name as file name // if resource is single file, use opts.name as file name
final realFileName = final realFileName = meta.res!.name.isEmpty
meta.res!.name.isEmpty ? file.name : ""; ? (meta.opts.name.isEmpty ? file.name : meta.opts.name)
: "";
final fileRelativePath = file.filePath(realFileName); final fileRelativePath = file.filePath(realFileName);
final filePath = Util.safePathJoin( final filePath = Util.safePathJoin(
[meta.opts.path, meta.res!.name, fileRelativePath]); [meta.opts.path, meta.res!.name, fileRelativePath]);
@@ -205,9 +205,11 @@ class BuildTaskListView extends GetView {
)), )),
], ],
), ),
LinearProgressIndicator( isDone()
value: getProgress(), ? Container()
), : LinearProgressIndicator(
value: getProgress(),
),
], ],
), ),
)).padding(horizontal: 14, top: 8); )).padding(horizontal: 14, top: 8);