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

This commit is contained in:
2026-02-11 08:55:42 +07:00
parent a9d2a0a24b
commit 9bee5f2a77
14 changed files with 962 additions and 1167 deletions

View File

@@ -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)
})
}