From 752f06b5e11ddc7160e02ae70b4c0dc014cc16c6 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Wed, 7 Aug 2024 07:05:51 +1200 Subject: [PATCH] Revert "Show reaction count alongside like count" This reverts commit 835734b39416fddb8484f49f439a4b7a603cbc9c. --- gossip-bin/src/ui/feed/note/mod.rs | 7 +------ gossip-lib/src/storage/mod.rs | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/gossip-bin/src/ui/feed/note/mod.rs b/gossip-bin/src/ui/feed/note/mod.rs index 1cb7e3ba3..952e01640 100644 --- a/gossip-bin/src/ui/feed/note/mod.rs +++ b/gossip-bin/src/ui/feed/note/mod.rs @@ -917,11 +917,6 @@ pub fn render_note_inner( }, ) .unwrap_or_default(); - let reaction_count: usize = note - .reactions - .iter() - .filter_map(|(c, s)| if *c == '+' { None } else { Some(s) }) - .sum(); let mut response = widgets::clickable_label( ui, can_sign, @@ -930,7 +925,7 @@ pub fn render_note_inner( response |= widgets::clickable_label( ui, can_sign, - format!("{}+{}", like_count, reaction_count), + format!("{}", like_count), ); let hover_ui = |ui: &mut Ui| { ui.horizontal_wrapped(|ui| { diff --git a/gossip-lib/src/storage/mod.rs b/gossip-lib/src/storage/mod.rs index 7e59b2789..ebccee849 100644 --- a/gossip-lib/src/storage/mod.rs +++ b/gossip-lib/src/storage/mod.rs @@ -1896,7 +1896,7 @@ impl Storage { continue; } } - let symbol: char = if reaction == "" { + let symbol: char = if reaction=="" { '+' } else if reaction.starts_with(":") && reaction.ends_with(":") { '□' // placeholder for custom reaction that we don't support