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)
|
// Add all the 'p' tags from the note we are replying to (except our own)
|
||||||
for tag in &event.tags {
|
for tag in &event.tags {
|
||||||
match tag {
|
if let Tag::Pubkey { pubkey, .. } = tag {
|
||||||
Tag::Pubkey { pubkey, .. } => {
|
|
||||||
add_pubkey_hex_to_tags(&mut tags, pubkey).await;
|
add_pubkey_hex_to_tags(&mut tags, pubkey).await;
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add tags for keys that are in the post body as npub1...
|
// 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") {
|
if !note.starts_with("note1") {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Id::try_from_bech32_string(¬e)
|
Id::try_from_bech32_string(note)
|
||||||
.ok()
|
.ok()
|
||||||
.map(|id| (note.to_string(), id))
|
.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| {
|
ui.menu_button("@", |ui| {
|
||||||
for pair in pairs {
|
for pair in pairs {
|
||||||
if ui.button(pair.0).clicked() {
|
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(' ');
|
||||||
}
|
}
|
||||||
app.draft.push_str(&pair.1.try_as_bech32_string().unwrap());
|
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()))
|
.add(Label::new(RichText::new("»").size(18.0)).sense(Sense::click()))
|
||||||
.clicked()
|
.clicked()
|
||||||
{
|
{
|
||||||
if !app.draft.ends_with(" ") && app.draft != "" {
|
if !app.draft.ends_with(' ') && !app.draft.is_empty() {
|
||||||
app.draft.push_str(" ");
|
app.draft.push(' ');
|
||||||
}
|
}
|
||||||
app.draft
|
app.draft
|
||||||
.push_str(&event.id.try_as_bech32_string().unwrap());
|
.push_str(&event.id.try_as_bech32_string().unwrap());
|
||||||
|
Loading…
Reference in New Issue
Block a user