summaryrefslogtreecommitdiffstats
path: root/examples/system_information
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 14:25:44 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 15:21:16 +0200
commit1aeb8b8340400e28219c17d7d2ee2a441ae1cd71 (patch)
tree670525243600e0b2f154f83da1d76902183b87ee /examples/system_information
parentf1ec0af5070fe2752967cdc38ed66b8b70882366 (diff)
downloadiced-1aeb8b8340400e28219c17d7d2ee2a441ae1cd71.tar.gz
iced-1aeb8b8340400e28219c17d7d2ee2a441ae1cd71.tar.bz2
iced-1aeb8b8340400e28219c17d7d2ee2a441ae1cd71.zip
Show `Loading` screen when refreshing in `system_information` example
Diffstat (limited to 'examples/system_information')
-rw-r--r--examples/system_information/src/main.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/system_information/src/main.rs b/examples/system_information/src/main.rs
index 704f5f4d..560220b8 100644
--- a/examples/system_information/src/main.rs
+++ b/examples/system_information/src/main.rs
@@ -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) => {