diff --git a/FerroUI b/FerroUI index c4c4cf8..b753739 160000 --- a/FerroUI +++ b/FerroUI @@ -1 +1 @@ -Subproject commit c4c4cf872a3f57166ebb00b343ca4b6c41a55eef +Subproject commit b753739811c34eba24c86ec383232053e914e42e diff --git a/Solitaire/src/app.rs b/Solitaire/src/app.rs index 0edcb0b..b77acbc 100644 --- a/Solitaire/src/app.rs +++ b/Solitaire/src/app.rs @@ -90,7 +90,7 @@ pub fn create_main_window() -> Ref { move || window.close(), std::time::Duration::from_millis(ms), ferroui::base::threading::DispatcherPriority::NORMAL, - ); + ).detach(); } window } diff --git a/Solitaire/src/views/casino_view.rs b/Solitaire/src/views/casino_view.rs index 71499e1..587cf6e 100644 --- a/Solitaire/src/views/casino_view.rs +++ b/Solitaire/src/views/casino_view.rs @@ -13,7 +13,7 @@ use ferroui::{ controls::ResourceDictionary, input::{InputElement, Key, KeyModifiers}, media::{DrawingImage, IImage}, - reactive::IDisposable, + reactive::Subscription, threading::{DispatcherPriority, DispatcherTimer}, }, controls::{ @@ -47,9 +47,9 @@ pub struct CasinoView { pub page: RefCell>>, artwork: Ref, dialog: Cell, - timer: RefCell>>, + timer: RefCell>, presentation: RefCell>>, - presentation_timer: RefCell>>, + presentation_timer: RefCell>, presentation_generation: Cell, } impl CasinoView { @@ -109,7 +109,7 @@ impl CasinoView { if let Some(timer) = this.timer.borrow_mut().take() { timer.dispose(); } - }); + }).detach(); let weak_window = window.downgrade(); self.start_clock(Rc::downgrade(self), move || { weak_window.upgrade().map(|window| window.is_active()) @@ -380,7 +380,7 @@ impl CasinoView { }, Duration::from_millis(16), DispatcherPriority::NORMAL, - ); + ).detach(); *self.page.borrow_mut() = Some(view); self.update_score(); self.refresh_message();