Commit a706489f authored by wudizhanche1000's avatar wudizhanche1000

更新时显示解压内容

parent bcbcdcf7
...@@ -574,10 +574,14 @@ export class AppsService { ...@@ -574,10 +574,14 @@ export class AppsService {
this.ref.tick(); this.ref.tick();
}); });
let downloadFiles = await this.downloadService.getFiles(downloadId); let downloadFiles = await this.downloadService.getFiles(downloadId);
app.status.total = 0;
// 刷新进度条
let interval = setInterval(() => {
}, 500);
for (let downloadFile of downloadFiles) { for (let downloadFile of downloadFiles) {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
this.extract(downloadFile, app.local!.path).subscribe(() => { this.extract(downloadFile, app.local!.path).subscribe((file) => {
app.status.progressMessage = file;
}, (error) => { }, (error) => {
reject(error); reject(error);
}, () => { }, () => {
...@@ -585,6 +589,7 @@ export class AppsService { ...@@ -585,6 +589,7 @@ export class AppsService {
}); });
}); });
} }
clearInterval(interval);
} }
if (deletedFiles && deletedFiles.size > 0) { if (deletedFiles && deletedFiles.size > 0) {
Logger.info("Found files deleted: ", deletedFiles); Logger.info("Found files deleted: ", deletedFiles);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment