redesign the sidebar
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 2m0s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m27s
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 2m0s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m27s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
@@ -576,17 +576,15 @@ impl NostrRegistry {
|
||||
}
|
||||
|
||||
/// Get contact list for the current user
|
||||
pub fn get_contact_list(&self, cx: &App) -> Task<Result<Vec<PublicKey>, Error>> {
|
||||
pub fn get_contact_list(&self, cx: &App) -> Task<Result<HashSet<PublicKey>, Error>> {
|
||||
let client = self.client();
|
||||
|
||||
cx.background_spawn(async move {
|
||||
let signer = client.signer().context("Signer not found")?;
|
||||
let public_key = signer.get_public_key().await?;
|
||||
|
||||
let contacts = client.database().contacts_public_keys(public_key).await?;
|
||||
let results = contacts.into_iter().collect();
|
||||
|
||||
Ok(results)
|
||||
Ok(contacts)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user