mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
clippy
This commit is contained in:
parent
08c47a4060
commit
9964ceba09
@ -721,12 +721,9 @@ 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, .. } => {
|
||||
if let Tag::Pubkey { pubkey, .. } = tag {
|
||||
add_pubkey_hex_to_tags(&mut tags, pubkey).await;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
// Add tags for keys that are in the post body as npub1...
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user