chore: follow up on #203

This commit is contained in:
2025-11-11 11:02:37 +07:00
parent de5134676d
commit d87bcfbd65
7 changed files with 164 additions and 122 deletions

View File

@@ -100,6 +100,15 @@ impl ChatPanel {
let mut subscriptions = smallvec![];
let mut tasks = smallvec![];
tasks.push(
// Get messaging relays and encryption keys announcement for each member
cx.background_spawn(async move {
if let Err(e) = connect.await {
log::error!("Failed to initialize room: {}", e);
}
}),
);
tasks.push(
// Load all messages belonging to this room
cx.spawn_in(window, async move |this, cx| {
@@ -119,15 +128,6 @@ impl ChatPanel {
}),
);
tasks.push(
// Get messaging relays and encryption keys announcement for each member
cx.background_spawn(async move {
if let Err(e) = connect.await {
log::error!("Failed to initialize room: {}", e);
}
}),
);
subscriptions.push(
// Subscribe to input events
cx.subscribe_in(