From f66143fbcdf408a5d384230cffa03b5ff74e69a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 29 Nov 2026 08:20:12 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20builders=20see=20a=20re?= =?UTF-8?q?ply=20to=20a=20deleted=20message=20as=20plain=20'Deleted=20mess?= =?UTF-8?q?age'=20like=20everyone;=20clicking=20it=20reveals=20the=20origi?= =?UTF-8?q?nal=20quote=20(then=20clicking=20jumps)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/gui/chat.rs | 2 ++ crates/client/src/gui/message_actions.rs | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/crates/client/src/gui/chat.rs b/crates/client/src/gui/chat.rs index c51d2fb..904ce6a 100644 --- a/crates/client/src/gui/chat.rs +++ b/crates/client/src/gui/chat.rs @@ -142,6 +142,7 @@ pub struct Chat { pub(super) muted: HashSet, pub(super) pinned: HashSet, pub(super) edits: HashMap>, + pub(super) revealed: HashSet, pub(super) message_input: Entity, pub(super) search_input: Entity, pub(super) friends_open: bool, @@ -434,6 +435,7 @@ impl Chat { muted: HashSet::new(), pinned: HashSet::new(), edits: HashMap::new(), + revealed: HashSet::new(), message_input, search_input, friends_open: false, diff --git a/crates/client/src/gui/message_actions.rs b/crates/client/src/gui/message_actions.rs index 20dc8c3..5e2f40f 100644 --- a/crates/client/src/gui/message_actions.rs +++ b/crates/client/src/gui/message_actions.rs @@ -168,9 +168,25 @@ pub fn quote_line( .border_color(palette.border) .text_size(text(text::CAPTION)) .text_color(palette.muted); + let holder = message.id; let (quote, deleted) = match message.reply.as_ref()? { Reply::Quote(quote) => (quote, false), - Reply::Deleted(Some(quote)) => (quote, true), + Reply::Deleted(Some(quote)) if chat.revealed.contains(&holder) => (quote, true), + Reply::Deleted(Some(_)) => { + let entity = entity.clone(); + return Some( + frame + .italic() + .cursor_pointer() + .on_click(move |_, _, cx| { + entity.update(cx, |yumush, cx| { + yumush.chat.revealed.insert(holder); + cx.notify(); + }) + }) + .child(w().message_actions.deleted), + ); + } Reply::Deleted(None) => { return Some(frame.italic().child(w().message_actions.deleted)); }