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_core::Announcement;
|
||||||
use signed_state::{Backend, BackendEvent, LocalReposStore, RepoListStore, ResolvedLocalRepo};
|
use signed_state::{Backend, BackendEvent, LocalReposStore, RepoListStore, ResolvedLocalRepo};
|
||||||
|
|
||||||
use crate::repo::RepoDetailView;
|
use crate::repo::{RepoDetailView, actions, dialogs};
|
||||||
use crate::repo::actions;
|
use crate::shared::{log_dropped, panels};
|
||||||
use crate::repo::dialogs;
|
|
||||||
use crate::shared::log_dropped;
|
|
||||||
use crate::shared::panels;
|
|
||||||
use crate::workspace::Workspace;
|
use crate::workspace::Workspace;
|
||||||
use crate::{identity, settings};
|
use crate::{identity, settings};
|
||||||
|
|
||||||
@@ -135,9 +132,8 @@ impl TitlebarView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn render_tabs(&self, cx: &App) -> Option<Tabs> {
|
pub fn render_tabs(&self, cx: &App) -> Option<Tabs> {
|
||||||
if Backend::global(cx).read(cx).current_user().is_none() {
|
let backend = Backend::global(cx);
|
||||||
return None;
|
backend.read(cx).current_user()?;
|
||||||
}
|
|
||||||
|
|
||||||
let announcements = self.announcements.clone();
|
let announcements = self.announcements.clone();
|
||||||
let local_repos = self.local_repos.clone();
|
let local_repos = self.local_repos.clone();
|
||||||
@@ -157,6 +153,7 @@ impl TitlebarView {
|
|||||||
.read_with(cx, |workspace, _| workspace.active_main_id().cloned())
|
.read_with(cx, |workspace, _| workspace.active_main_id().cloned())
|
||||||
.ok()
|
.ok()
|
||||||
.flatten();
|
.flatten();
|
||||||
|
|
||||||
let selected = active
|
let selected = active
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|id| keys.iter().position(|key| key == id))
|
.and_then(|id| keys.iter().position(|key| key == id))
|
||||||
@@ -193,7 +190,7 @@ impl TitlebarView {
|
|||||||
for entry in local_repos.iter() {
|
for entry in local_repos.iter() {
|
||||||
tabs.push(
|
tabs.push(
|
||||||
Tab::new(local_key(entry), entry.name())
|
Tab::new(local_key(entry), entry.name())
|
||||||
.kind("Local")
|
.kind("Local Repositories")
|
||||||
.lead(local_avatar(entry, &directory, cx)),
|
.lead(local_avatar(entry, &directory, cx)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -342,9 +339,8 @@ impl TitlebarView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn render_actions(&self, cx: &App) -> Option<AnyElement> {
|
pub fn render_actions(&self, cx: &App) -> Option<AnyElement> {
|
||||||
if Backend::global(cx).read(cx).current_user().is_none() {
|
let backend = Backend::global(cx);
|
||||||
return None;
|
backend.read(cx).current_user()?;
|
||||||
}
|
|
||||||
|
|
||||||
let workspace = self.workspace.clone();
|
let workspace = self.workspace.clone();
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ impl Render for Workspace {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|active| self.details.iter().position(|(id, _)| id == active))
|
.and_then(|active| self.details.iter().position(|(id, _)| id == active))
|
||||||
.unwrap_or(usize::MAX);
|
.unwrap_or(usize::MAX);
|
||||||
|
|
||||||
let details = self.details.clone();
|
let details = self.details.clone();
|
||||||
let weak = cx.entity().downgrade();
|
let weak = cx.entity().downgrade();
|
||||||
let close_weak = weak.clone();
|
let close_weak = weak.clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user