diff --git a/src/overlord/mod.rs b/src/overlord/mod.rs index 3dd6230d..a16147c2 100644 --- a/src/overlord/mod.rs +++ b/src/overlord/mod.rs @@ -721,11 +721,8 @@ impl Overlord { // Add all the 'p' tags from the note we are replying to (except our own) for tag in &event.tags { - match tag { - Tag::Pubkey { pubkey, .. } => { - add_pubkey_hex_to_tags(&mut tags, pubkey).await; - } - _ => {} + if let Tag::Pubkey { pubkey, .. } = tag { + add_pubkey_hex_to_tags(&mut tags, pubkey).await; } } diff --git a/src/tags.rs b/src/tags.rs index 415de28b..53ad9745 100644 --- a/src/tags.rs +++ b/src/tags.rs @@ -26,7 +26,7 @@ pub fn notes_from_text(text: &str) -> Vec<(String, Id)> { if !note.starts_with("note1") { None } else { - Id::try_from_bech32_string(¬e) + Id::try_from_bech32_string(note) .ok() .map(|id| (note.to_string(), id)) } diff --git a/src/ui/feed.rs b/src/ui/feed.rs index 5c1980da..8d407268 100644 --- a/src/ui/feed.rs +++ b/src/ui/feed.rs @@ -172,7 +172,7 @@ fn real_posting_area(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram ui.menu_button("@", |ui| { for pair in pairs { if ui.button(pair.0).clicked() { - if !app.draft.ends_with(' ') && app.draft != "" { + if !app.draft.ends_with(' ') && !app.draft.is_empty() { app.draft.push(' '); } app.draft.push_str(&pair.1.try_as_bech32_string().unwrap()); @@ -518,8 +518,8 @@ fn render_post_actual( .add(Label::new(RichText::new("ยป").size(18.0)).sense(Sense::click())) .clicked() { - if !app.draft.ends_with(" ") && app.draft != "" { - app.draft.push_str(" "); + if !app.draft.ends_with(' ') && !app.draft.is_empty() { + app.draft.push(' '); } app.draft .push_str(&event.id.try_as_bech32_string().unwrap());