From a94ebc360317dbb9648394d43b5e5c238711c0a3 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 19 Jan 2025 12:40:00 -0800 Subject: [PATCH] mutes: hide logs these are getting spammed on each frame. not ideal Signed-off-by: William Casarin --- crates/notedeck/src/muted.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/notedeck/src/muted.rs b/crates/notedeck/src/muted.rs index 7d4adddf..3d038033 100644 --- a/crates/notedeck/src/muted.rs +++ b/crates/notedeck/src/muted.rs @@ -1,7 +1,7 @@ use nostrdb::Note; use std::collections::BTreeSet; -use tracing::{debug, trace}; +//use tracing::{debug, trace}; // If the note is muted return a reason string, otherwise None pub type MuteFun = dyn Fn(&Note, &[u8; 32]) -> bool; @@ -35,18 +35,22 @@ impl std::fmt::Debug for Muted { impl Muted { // If the note is muted return a reason string, otherwise None pub fn is_muted(&self, note: &Note, thread: &[u8; 32]) -> bool { + /* trace!( "{}: thread: {}", hex::encode(note.id()), hex::encode(thread) ); + */ if self.pubkeys.contains(note.pubkey()) { - debug!( + /* + trace!( "{}: MUTED pubkey: {}", hex::encode(note.id()), hex::encode(note.pubkey()) ); + */ return true; } // FIXME - Implement hashtag muting here @@ -64,11 +68,13 @@ impl Muted { // } if self.threads.contains(thread) { - debug!( + /* + trace!( "{}: MUTED thread: {}", hex::encode(note.id()), hex::encode(thread) ); + */ return true; }