feat: improve compose modal

This commit is contained in:
reya
2025-01-20 15:49:21 +07:00
parent 8f6bedf70a
commit 5f6ba4f0a6
20 changed files with 245 additions and 117 deletions
+2 -2
View File
@@ -126,7 +126,7 @@ impl ChatRegistry {
let id = room_hash(&ev.tags);
// Filter all seen events
if !hashes.iter().any(|h| h == &id) {
Some(cx.new_model(|_| Room::new(&ev)))
Some(cx.new_model(|_| Room::parse(&ev)))
} else {
None
}
@@ -170,7 +170,7 @@ impl ChatRegistry {
cx.notify();
})
} else {
let room = cx.new_model(|_| Room::new(&event));
let room = cx.new_model(|_| Room::parse(&event));
self.inbox.update(cx, |this, cx| {
this.rooms.insert(0, room);