Show Loading screen when refreshing in system_information example
This commit is contained in:
parent
f1ec0af507
commit
1aeb8b8340
1 changed files with 2 additions and 0 deletions
|
|
@ -42,6 +42,8 @@ impl Application for Example {
|
|||
fn update(&mut self, message: Message) -> Command<Message> {
|
||||
match message {
|
||||
Message::Refresh => {
|
||||
*self = Self::Loading;
|
||||
|
||||
return system::fetch_information(Message::InformationReceived);
|
||||
}
|
||||
Message::InformationReceived(information) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue