add muted helper

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-08-24 23:14:53 -04:00
parent 2973a0c6c5
commit 7b1ace328f
2 changed files with 9 additions and 0 deletions

View File

@@ -267,6 +267,11 @@ impl Accounts {
Box::new(move |note: &Note, thread: &[u8; 32]| muted.is_muted(note, thread)) 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) { pub fn send_initial_filters(&mut self, pool: &mut RelayPool, relay_url: &str) {
let data = &self.get_selected_account().data; let data = &self.get_selected_account().data;
// send the active account's relay list subscription // send the active account's relay list subscription

View File

@@ -80,4 +80,8 @@ impl Muted {
false false
} }
pub fn is_pk_muted(&self, pk: &[u8; 32]) -> bool {
self.pubkeys.contains(pk)
}
} }