update
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
|
||||
use iris::prelude::*;
|
||||
use openworm::net::UserId;
|
||||
|
||||
use crate::{net::NetHandle, ui::UserCache};
|
||||
use crate::{Rsc, net::NetHandle, ui::UserCache};
|
||||
|
||||
// TODO: this really should not be async...
|
||||
// I mean it could be used async but all widgets
|
||||
@@ -32,4 +33,9 @@ impl Session {
|
||||
pub fn get(&self) -> MutexGuard<'_, SessionInner> {
|
||||
self.0.try_lock().unwrap()
|
||||
}
|
||||
|
||||
pub fn reactive_span(&self, rsc: &mut Rsc) -> WeakWidget {
|
||||
let span = Span::empty(Dir::DOWN).add(rsc);
|
||||
span
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user