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