notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 7b1ace328f005dfede1b7d479fdf28553414c3af
parent 2973a0c6c572aa9aac7a5a24984f7f5517481ee9
Author: kernelkind <kernelkind@gmail.com>
Date:   Sun, 24 Aug 2025 23:14:53 -0400

add muted helper

Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Mcrates/notedeck/src/account/accounts.rs | 5+++++
Mcrates/notedeck/src/muted.rs | 4++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/crates/notedeck/src/account/accounts.rs b/crates/notedeck/src/account/accounts.rs @@ -267,6 +267,11 @@ impl Accounts { Box::new(move |note: &Note, thread: &[u8; 32]| muted.is_muted(note, thread)) } + pub fn mute(&self) -> Box<Arc<crate::Muted>> { + let account_data = self.get_selected_account_data(); + Box::new(Arc::clone(&account_data.muted.muted)) + } + pub fn send_initial_filters(&mut self, pool: &mut RelayPool, relay_url: &str) { let data = &self.get_selected_account().data; // send the active account's relay list subscription diff --git a/crates/notedeck/src/muted.rs b/crates/notedeck/src/muted.rs @@ -80,4 +80,8 @@ impl Muted { false } + + pub fn is_pk_muted(&self, pk: &[u8; 32]) -> bool { + self.pubkeys.contains(pk) + } }