chore: refactor the compose modal (#156)

* .

* update

* clean up
This commit is contained in:
reya
2025-09-18 08:39:24 +07:00
committed by GitHub
parent c12856cda0
commit 4164651342
7 changed files with 361 additions and 377 deletions

View File

@@ -324,7 +324,7 @@ impl Registry {
let is_ongoing = client.database().count(filter).await.unwrap_or(1) >= 1;
// Create a new room
let room = Room::new(&event).rearrange_by(public_key);
let room = Room::from(&event).current_user(public_key);
if is_ongoing || bypassed {
rooms.insert(room.kind(RoomKind::Ongoing));
@@ -458,9 +458,7 @@ impl Registry {
});
}
} else {
let room = Room::new(&event)
.kind(RoomKind::default())
.rearrange_by(identity);
let room = Room::from(&event).current_user(identity);
// Push the new room to the front of the list
self.add_room(cx.new(|_| room), cx);