diff --git a/gossip-bin/src/ui/feed/note/mod.rs b/gossip-bin/src/ui/feed/note/mod.rs index f4bbbe42..f691d141 100644 --- a/gossip-bin/src/ui/feed/note/mod.rs +++ b/gossip-bin/src/ui/feed/note/mod.rs @@ -926,6 +926,11 @@ 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, @@ -934,7 +939,7 @@ pub fn render_note_inner( response |= widgets::clickable_label( ui, can_sign, - format!("{}", like_count), + format!("{}+{}", like_count, reaction_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 ebccee84..7e59b278 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