summaryrefslogtreecommitdiffstats
path: root/examples/todos
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-20 01:13:42 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-20 01:13:42 +0200
commitc5f4bebeda8d6ef10efade7933a5ee58f06b62d1 (patch)
tree06bf997c68ec1e6d67bfc0c728553f31f8d23787 /examples/todos
parent92e08c8f07511cc212cbce545fb7739ef1a4bf1f (diff)
downloadiced-c5f4bebeda8d6ef10efade7933a5ee58f06b62d1.tar.gz
iced-c5f4bebeda8d6ef10efade7933a5ee58f06b62d1.tar.bz2
iced-c5f4bebeda8d6ef10efade7933a5ee58f06b62d1.zip
Remove `window::Id::MAIN` constant
Diffstat (limited to 'examples/todos')
-rw-r--r--examples/todos/src/main.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs
index a834c946..6ed50d31 100644
--- a/examples/todos/src/main.rs
+++ b/examples/todos/src/main.rs
@@ -149,9 +149,10 @@ impl Todos {
widget::focus_next()
}
}
- Message::ToggleFullscreen(mode) => {
- window::change_mode(window::Id::MAIN, mode)
- }
+ Message::ToggleFullscreen(mode) => window::get_latest()
+ .and_then(move |window| {
+ window::change_mode(window, mode)
+ }),
Message::Loaded(_) => Command::none(),
};