Actually deliver test events to subscribers

This commit is contained in:
Conrad Irwin 2023-10-31 16:04:33 +00:00
parent 81f8e81e48
commit 0e9a82711c

View file

@ -161,8 +161,8 @@ impl TestAppContext {
let (mut tx, rx) = futures::channel::mpsc::unbounded(); let (mut tx, rx) = futures::channel::mpsc::unbounded();
entity entity
.update(self, |_, cx: &mut ModelContext<T>| { .update(self, |_, cx: &mut ModelContext<T>| {
cx.subscribe(&entity, move |_, _, event, _| { cx.subscribe(&entity, move |_, _, event, cx| {
let _ = tx.send(event.clone()); cx.executor().block(tx.send(event.clone())).unwrap();
}) })
}) })
.detach(); .detach();