mirror of
https://gitlab.com/erkanisik/yali-rs.git
synced 2026-07-31 03:09:00 +00:00
fix: simulate sub-progress in demo mode for CopyFilesJob
This commit is contained in:
+8
-1
@@ -193,7 +193,14 @@ impl Job for CopyFilesJob {
|
||||
args.push(self.target.clone());
|
||||
|
||||
if DEMO_MODE.load(Ordering::Relaxed) {
|
||||
tokio::time::sleep(std::time::Duration::from_secs(3)).await;
|
||||
ui.log("rsync /run/livecd/squashfs-root/ → /mnt (DEMO)");
|
||||
let steps = 20;
|
||||
for i in 0..steps {
|
||||
let p = (i + 1) as f32 / steps as f32;
|
||||
ui.current_file(format!("/usr/share/doc/{}/README.md", (i * 137) % 50));
|
||||
ui.sub_progress(p);
|
||||
tokio::time::sleep(std::time::Duration::from_millis(150)).await;
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user