feat: add basic profile panel
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

This commit is contained in:
2026-11-29 15:24:16 +07:00
parent cf81443411
commit 6dfa3a2335
13 changed files with 906 additions and 296 deletions
+10 -1
View File
@@ -60,6 +60,16 @@ impl Profile {
.map(|p| SharedString::from(p.clone()))
}
/// The user's bio, when set and non-empty.
pub fn about(&self) -> Option<SharedString> {
self.metadata
.about
.as_ref()
.map(|about| about.trim().to_owned())
.filter(|about| !about.is_empty())
.map(SharedString::from)
}
/// The newest profile per author from metadata events.
fn latest_profiles(events: impl IntoIterator<Item = Event>) -> Vec<Self> {
let mut latest: HashMap<PublicKey, (Timestamp, Metadata)> = HashMap::new();
@@ -138,7 +148,6 @@ impl ProfileStore {
loop {
let now = Instant::now();
if now >= deadline {
break;
}