feat: improve search and handle input in compose (#67)

* feat: support search by npub or nprofile

* .

* .

* .

* chore: prevent update local search with empty result

* clean up

* .
This commit is contained in:
reya
2025-06-25 15:03:05 +07:00
committed by GitHub
parent c7e3331eb0
commit edee9305cc
7 changed files with 550 additions and 314 deletions

View File

@@ -302,6 +302,12 @@ impl Globals {
})
}
pub async fn request_metadata(&self, public_key: PublicKey) {
if let Err(e) = self.batch_sender.send(public_key).await {
log::error!("Failed to request metadata: {e}")
}
}
/// Gets a person's profile from cache or creates default (blocking)
pub fn person(&self, public_key: &PublicKey) -> Profile {
let metadata = if let Some(metadata) = self.persons.read_blocking().get(public_key) {