summaryrefslogtreecommitdiffstats
path: root/src/components/chat_header.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-06-02 19:50:45 +0100
committerLibravatar cel 🌸 <cel@bunny.garden>2025-06-02 19:50:45 +0100
commitab654372e4d3766c8df17623a6de8922fc2a1960 (patch)
tree59ff88ab5da68af23ad84bc2310730e29eb89410 /src/components/chat_header.rs
parent6ee4190a26f32bfa953302ee363ad3bb6c384ebb (diff)
downloadmacaw-web-ab654372e4d3766c8df17623a6de8922fc2a1960.tar.gz
macaw-web-ab654372e4d3766c8df17623a6de8922fc2a1960.tar.bz2
macaw-web-ab654372e4d3766c8df17623a6de8922fc2a1960.zip
feat: make `MacawUser`, `MacawChat` and `MacawMessage` arena-allocated
Diffstat (limited to 'src/components/chat_header.rs')
-rw-r--r--src/components/chat_header.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/chat_header.rs b/src/components/chat_header.rs
index 208e7f6..ab33d2b 100644
--- a/src/components/chat_header.rs
+++ b/src/components/chat_header.rs
@@ -6,13 +6,12 @@ use crate::{chat::MacawChat, components::avatar::AvatarWithPresence, user::get_n
#[component]
pub fn ChatViewHeader(chat: MacawChat) -> impl IntoView {
- let chat_user = <ArcStore<filamento::user::User> as Clone>::clone(&chat.user).into();
- let name = move || get_name(chat_user, true);
- let jid = move || chat_user.jid().read().to_string();
+ let name = move || get_name(chat.user.get().into(), true);
+ let jid = move || chat.user.get().jid().read().to_string();
view! {
<div class="chat-view-header panel">
- <AvatarWithPresence user=chat_user />
+ <AvatarWithPresence user=chat.user.get().into() />
<div class="user-info">
<h2 class="name">{name}</h2>
<h3>{jid}</h3>