Update share icon and swap its posiiton

This commit is contained in:
Antonio Scandurra 2022-04-26 14:35:13 +02:00
parent 9d6a7a83a0
commit c955645bc0
15 changed files with 440 additions and 1205 deletions

View file

@ -669,6 +669,10 @@ impl Project {
.map(|worktree| worktree.read(cx).id())
}
pub fn can_share(&self, cx: &AppContext) -> bool {
self.is_local() && self.visible_worktrees(cx).next().is_some()
}
pub fn share(&self, cx: &mut ModelContext<Self>) -> Task<Result<()>> {
let rpc = self.client.clone();
cx.spawn(|this, mut cx| async move {