chore: refactor the login flow

This commit is contained in:
2026-10-13 11:09:37 +07:00
parent a249326c28
commit bbc69c9861
9 changed files with 488 additions and 294 deletions
+3 -4
View File
@@ -594,11 +594,10 @@ impl ChatRegistry {
let id = room.read(cx).id;
if let hash_map::Entry::Vacant(e) = self.room_index.entry(id) {
let entity = room.to_owned();
entity.update(cx, |room, cx| room.ensure_directory(cx));
e.insert(entity.clone());
room.update(cx, |room, cx| room.ensure_directory(cx));
e.insert(room.clone());
self.rooms.insert(0, entity);
self.rooms.insert(0, room.clone());
cx.notify();
}
}