diff options
author | 2024-06-20 01:13:42 +0200 | |
---|---|---|
committer | 2024-06-20 01:13:42 +0200 | |
commit | c5f4bebeda8d6ef10efade7933a5ee58f06b62d1 (patch) | |
tree | 06bf997c68ec1e6d67bfc0c728553f31f8d23787 /examples/todos | |
parent | 92e08c8f07511cc212cbce545fb7739ef1a4bf1f (diff) | |
download | iced-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.rs | 7 |
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(), }; |