From 22550dec98180fb091534a3a1a34c96c263fc10c Mon Sep 17 00:00:00 2001 From: Nikkuss Date: Fri, 14 Nov 2025 21:59:59 +0000 Subject: [PATCH] make total downloads bar work --- src/handlers/substitute_status.rs | 6 +++--- src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/handlers/substitute_status.rs b/src/handlers/substitute_status.rs index a6657ec..b63e3e1 100644 --- a/src/handlers/substitute_status.rs +++ b/src/handlers/substitute_status.rs @@ -145,11 +145,11 @@ impl Handler for SubstitutionStatusHandler { id, fields: ResultFields::SetExpected { - action: ActionType::CopyPaths, + action: ActionType::FileTransfer, expected, }, } => { - self.max_copy = *expected; + self.max_transfer = *expected; self.draw_bar(state.term_width); Ok(true) } @@ -157,7 +157,7 @@ impl Handler for SubstitutionStatusHandler { id, fields: ResultFields::SetExpected { - action: ActionType::CopyPaths, + action: ActionType::CopyPath, expected, }, } => { diff --git a/src/main.rs b/src/main.rs index a4528f4..ac6393a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ fn main() -> Result<(), color_eyre::Report> { for line in lines.lines() { let line = line.strip_prefix("@nix ").unwrap_or(line); - sleep(Duration::from_millis(1)); + sleep(Duration::from_nanos(500)); let action = action::Action::parse(line)?; state.handle(&action)?; // match action {