mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 16:31:18 +00:00
Tagging: Replace tag search anywhere in text (to support adding tags after writing text)
This commit is contained in:
parent
51baa10607
commit
3b5fb1679d
@ -602,17 +602,15 @@ fn real_posting_area(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
|
|||||||
"".to_string()
|
"".to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// replace with nostr url
|
||||||
|
let nostr_url: NostrUrl = pair.1.into();
|
||||||
|
let nurl = format!("{}", nostr_url);
|
||||||
app.draft_data.draft = app
|
app.draft_data.draft = app
|
||||||
.draft_data
|
.draft_data
|
||||||
.draft
|
.draft
|
||||||
.trim_end_matches(format!("@{}", search).as_str())
|
.replace(&format!("@{}", search), &nurl)
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
// replace with nostr url
|
|
||||||
let nostr_url: NostrUrl = pair.1.into();
|
|
||||||
app.draft_data
|
|
||||||
.draft
|
|
||||||
.push_str(&format!("{} ", nostr_url));
|
|
||||||
app.draft_data.tag_someone = "".to_owned();
|
app.draft_data.tag_someone = "".to_owned();
|
||||||
|
|
||||||
// mover cursor to end
|
// mover cursor to end
|
||||||
|
Loading…
Reference in New Issue
Block a user