diff options
| author | 2024-06-20 01:23:01 +0200 | |
|---|---|---|
| committer | 2024-06-20 01:23:01 +0200 | |
| commit | 714d4503154a6224c26f2eed6e399c73d57b4bf8 (patch) | |
| tree | 9456eb2d40f2761c29dfa51f370efe11dc22f5e5 /examples/todos | |
| parent | 19db068bbbebcda1756720525da247f35bd3a5e0 (diff) | |
| parent | c5f4bebeda8d6ef10efade7933a5ee58f06b62d1 (diff) | |
| download | iced-714d4503154a6224c26f2eed6e399c73d57b4bf8.tar.gz iced-714d4503154a6224c26f2eed6e399c73d57b4bf8.tar.bz2 iced-714d4503154a6224c26f2eed6e399c73d57b4bf8.zip  | |
Merge pull request #2469 from iced-rs/unify-shell-runtimes
`Daemon` API and Shell Runtime Unification
Diffstat (limited to '')
| -rw-r--r-- | examples/todos/src/main.rs | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index c21e1a96..6ed50d31 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -17,7 +17,7 @@ pub fn main() -> iced::Result {      #[cfg(not(target_arch = "wasm32"))]      tracing_subscriber::fmt::init(); -    iced::program(Todos::title, Todos::update, Todos::view) +    iced::application(Todos::title, Todos::update, Todos::view)          .load(Todos::load)          .subscription(Todos::subscription)          .font(include_bytes!("../fonts/icons.ttf").as_slice()) @@ -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(),                  };  | 
