Checkpoint: Storybook window showing

This commit is contained in:
Marshall Bowers 2023-09-29 21:51:27 -04:00
parent 3b38641f98
commit 43a1296150
3 changed files with 28 additions and 14 deletions

View file

@ -4,7 +4,7 @@ use parking_lot::Mutex;
use std::sync::Weak;
#[derive(Clone)]
pub struct AsyncContext(pub(crate) Weak<Mutex<AppContext>>);
pub struct AsyncContext<Thread = ()>(pub(crate) Weak<Mutex<AppContext<Thread>>>);
impl Context for AsyncContext {
type EntityContext<'a, 'b, T: Send + Sync + 'static> = ModelContext<'a, T>;
@ -36,7 +36,7 @@ impl Context for AsyncContext {
}
}
impl AsyncContext {
impl<Thread: 'static + Send + Sync> AsyncContext<Thread> {
pub fn update_window<T>(
&self,
handle: AnyWindowHandle,