From 92b4ecd7006f68f87dff3130b85c00dddacead85 Mon Sep 17 00:00:00 2001 From: nc Date: Sat, 8 Aug 2020 10:09:52 -0400 Subject: try to unconditionally save after s.run() completes --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index d96119e..1d9efb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,5 +61,12 @@ fn main() { s.set_theme(theme::theme_gen()); s.run(); + + let app = std::rc::Rc::try_unwrap(s.find_name::>("Main").unwrap() + .get_mut() + .into_owner() + .into_owner()).ok().unwrap().into_inner(); + app.save_state(); + } } -- cgit v1.2.3