update tabbar

This commit is contained in:
2026-09-24 13:54:04 +07:00
parent 610bf816b0
commit 2a50804583
12 changed files with 80 additions and 242 deletions
+6 -5
View File
@@ -11,7 +11,7 @@ use concord::cord06::RekeyScope;
use concord::derive::{channel_group_key, grant_locator};
use concord::state::{ChannelCursor, ChannelKeyRef, CommunityState, HeldKey, HeldRoot};
use concord::{ChannelId, CommunityId, Epoch};
use gpui::{App, AppContext, Context, EventEmitter, Task};
use gpui::{App, AppContext, Context, EventEmitter, SharedString, Task};
use nostr_sdk::prelude::*;
use smallvec::{SmallVec, smallvec};
use state::NostrRegistry;
@@ -178,15 +178,16 @@ impl Community {
&self.state
}
pub fn name(&self) -> String {
pub fn name(&self) -> SharedString {
if let Some(metadata) = &self.control.community {
return metadata.name.clone();
return SharedString::from(&metadata.name);
}
self.state
.name
.clone()
.unwrap_or_else(|| self.state.id.to_hex())
.as_ref()
.map(SharedString::from)
.unwrap_or_else(|| SharedString::from("Unknown"))
}
pub fn control(&self) -> &ControlFold {