update
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
Rust / build (macos-latest, stable) (pull_request) Canceled after 0s
Rust / build (ubuntu-latest, stable) (pull_request) Canceled after 0s
Rust / build (windows-latest, stable) (pull_request) Canceled after 0s
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
Rust / build (macos-latest, stable) (pull_request) Canceled after 0s
Rust / build (ubuntu-latest, stable) (pull_request) Canceled after 0s
Rust / build (windows-latest, stable) (pull_request) Canceled after 0s
This commit is contained in:
@@ -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<Tabs> {
|
||||
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<AnyElement> {
|
||||
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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user