From 6c34392d7467443072fb6056fe34cbe25557985b Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Sun, 15 Nov 2026 15:32:22 +0700 Subject: [PATCH] update --- crates/.keep | 0 crates/signed_app/src/titlebar/mod.rs | 20 ++++++++------------ crates/signed_app/src/workspace.rs | 1 + 3 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 crates/.keep diff --git a/crates/.keep b/crates/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/crates/signed_app/src/titlebar/mod.rs b/crates/signed_app/src/titlebar/mod.rs index e76cf4f..50b0b86 100644 --- a/crates/signed_app/src/titlebar/mod.rs +++ b/crates/signed_app/src/titlebar/mod.rs @@ -18,11 +18,8 @@ use nostr::prelude::PublicKey; use signed_core::Announcement; use signed_state::{Backend, BackendEvent, LocalReposStore, RepoListStore, ResolvedLocalRepo}; -use crate::repo::RepoDetailView; -use crate::repo::actions; -use crate::repo::dialogs; -use crate::shared::log_dropped; -use crate::shared::panels; +use crate::repo::{RepoDetailView, actions, dialogs}; +use crate::shared::{log_dropped, panels}; use crate::workspace::Workspace; use crate::{identity, settings}; @@ -135,9 +132,8 @@ impl TitlebarView { } pub fn render_tabs(&self, cx: &App) -> Option { - if Backend::global(cx).read(cx).current_user().is_none() { - return None; - } + let backend = Backend::global(cx); + backend.read(cx).current_user()?; let announcements = self.announcements.clone(); let local_repos = self.local_repos.clone(); @@ -157,6 +153,7 @@ impl TitlebarView { .read_with(cx, |workspace, _| workspace.active_main_id().cloned()) .ok() .flatten(); + let selected = active .as_ref() .and_then(|id| keys.iter().position(|key| key == id)) @@ -193,7 +190,7 @@ impl TitlebarView { for entry in local_repos.iter() { tabs.push( Tab::new(local_key(entry), entry.name()) - .kind("Local") + .kind("Local Repositories") .lead(local_avatar(entry, &directory, cx)), ); } @@ -342,9 +339,8 @@ impl TitlebarView { } pub fn render_actions(&self, cx: &App) -> Option { - if Backend::global(cx).read(cx).current_user().is_none() { - return None; - } + let backend = Backend::global(cx); + backend.read(cx).current_user()?; let workspace = self.workspace.clone(); diff --git a/crates/signed_app/src/workspace.rs b/crates/signed_app/src/workspace.rs index b38d53e..5143ba2 100644 --- a/crates/signed_app/src/workspace.rs +++ b/crates/signed_app/src/workspace.rs @@ -157,6 +157,7 @@ impl Render for Workspace { .as_ref() .and_then(|active| self.details.iter().position(|(id, _)| id == active)) .unwrap_or(usize::MAX); + let details = self.details.clone(); let weak = cx.entity().downgrade(); let close_weak = weak.clone();