mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
make progress fraction value update optional
This commit is contained in:
parent
a145ea4b6d
commit
46bf3c30ec
3 changed files with 43 additions and 39 deletions
|
|
@ -399,11 +399,12 @@ impl Page {
|
|||
pub fn update(&self) {
|
||||
// Interpret status to progress fraction
|
||||
let progress_fraction = match self.meta.borrow().status {
|
||||
Some(Status::Prepare) => 0.25,
|
||||
Some(Status::Connect) => 0.50,
|
||||
Some(Status::Request) => 0.75,
|
||||
Some(Status::Response | Status::Success) => 1.0,
|
||||
_ => 0.0,
|
||||
Some(Status::Success) => Some(0.0),
|
||||
Some(Status::Prepare) => Some(0.25),
|
||||
Some(Status::Connect) => Some(0.50),
|
||||
Some(Status::Request) => Some(0.75),
|
||||
Some(Status::Response) => Some(1.0),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
// Update components
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue