Fix input events and drop spawning tokio

This commit is contained in:
2026-07-14 22:29:45 +02:00
parent 08edc981ee
commit b8162ebe3c
3 changed files with 16 additions and 8 deletions
+3 -1
View File
@@ -59,7 +59,9 @@ impl<'a, T> std::ops::DerefMut for StateGuard<'a, T> {
impl<'a, T> Drop for StateGuard<'a, T> {
fn drop(&mut self) {
if self.is_mutated {
self.tx.blocking_send(Box::new(Refresh)).unwrap()
let tx = self.tx.clone();
tokio::spawn(async move { tx.send(Box::new(Refresh)).await.unwrap() });
}
}
}