feat: add edit profile panel

This commit is contained in:
2025-02-03 15:21:29 +07:00
parent d921720042
commit b58327d431
11 changed files with 392 additions and 131 deletions

View File

@@ -26,11 +26,6 @@ impl NostrProfile {
self.public_key
}
/// Set contact's metadata
pub fn metadata(&mut self, metadata: &Metadata) {
self.metadata = metadata.clone()
}
/// Get contact's avatar
pub fn avatar(&self) -> String {
if let Some(picture) = &self.metadata.picture {
@@ -59,4 +54,14 @@ impl NostrProfile {
shorted_public_key(self.public_key)
}
/// Get contact's metadata
pub fn metadata(&mut self) -> &Metadata {
&self.metadata
}
/// Set contact's metadata
pub fn set_metadata(&mut self, metadata: &Metadata) {
self.metadata = metadata.clone()
}
}