mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
implement progress fraction update
This commit is contained in:
parent
85629e9dcb
commit
2d160b5a49
3 changed files with 14 additions and 5 deletions
|
|
@ -388,8 +388,16 @@ impl Page {
|
|||
|
||||
pub fn update(&self) {
|
||||
// Interpret status to progress fraction
|
||||
// @TODO
|
||||
self.navigation.update();
|
||||
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) => 1.0,
|
||||
_ => 0.0,
|
||||
};
|
||||
|
||||
// Update components
|
||||
self.navigation.update(progress_fraction);
|
||||
// @TODO self.content.update();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue