make total downloads bar work
This commit is contained in:
@@ -145,11 +145,11 @@ impl Handler for SubstitutionStatusHandler {
|
|||||||
id,
|
id,
|
||||||
fields:
|
fields:
|
||||||
ResultFields::SetExpected {
|
ResultFields::SetExpected {
|
||||||
action: ActionType::CopyPaths,
|
action: ActionType::FileTransfer,
|
||||||
expected,
|
expected,
|
||||||
},
|
},
|
||||||
} => {
|
} => {
|
||||||
self.max_copy = *expected;
|
self.max_transfer = *expected;
|
||||||
self.draw_bar(state.term_width);
|
self.draw_bar(state.term_width);
|
||||||
Ok(true)
|
Ok(true)
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ impl Handler for SubstitutionStatusHandler {
|
|||||||
id,
|
id,
|
||||||
fields:
|
fields:
|
||||||
ResultFields::SetExpected {
|
ResultFields::SetExpected {
|
||||||
action: ActionType::CopyPaths,
|
action: ActionType::CopyPath,
|
||||||
expected,
|
expected,
|
||||||
},
|
},
|
||||||
} => {
|
} => {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ fn main() -> Result<(), color_eyre::Report> {
|
|||||||
|
|
||||||
for line in lines.lines() {
|
for line in lines.lines() {
|
||||||
let line = line.strip_prefix("@nix ").unwrap_or(line);
|
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)?;
|
let action = action::Action::parse(line)?;
|
||||||
state.handle(&action)?;
|
state.handle(&action)?;
|
||||||
// match action {
|
// match action {
|
||||||
|
|||||||
Reference in New Issue
Block a user