This commit is contained in:
2026-07-29 11:15:42 +07:00
parent ef7698d248
commit 5945251a60
4 changed files with 32 additions and 14 deletions

View File

@@ -262,7 +262,11 @@ impl ChatPanel {
this.insert_message(message, false, cx);
}
RoomEvent::Reload => {
this.get_messages(window, cx);
// Defer to avoid re-entrant read on Room while
// emit_refresh holds a write lock (via refresh_rooms).
cx.defer_in(window, |this, window, cx| {
this.get_messages(window, cx);
});
}
};
},