mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
code review
This commit is contained in:
parent
fb57299a1d
commit
8922437fcd
6 changed files with 14 additions and 39 deletions
|
@ -878,7 +878,7 @@ impl Room {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn next_room_update(&mut self) -> impl Future<Output = ()> {
|
pub fn room_update_completed(&mut self) -> impl Future<Output = ()> {
|
||||||
let mut done_rx = self.room_update_completed_rx.clone();
|
let mut done_rx = self.room_update_completed_rx.clone();
|
||||||
async move {
|
async move {
|
||||||
while let Some(result) = done_rx.next().await {
|
while let Some(result) = done_rx.next().await {
|
||||||
|
|
|
@ -47,7 +47,6 @@ use std::{
|
||||||
any::TypeId,
|
any::TypeId,
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
cmp, env,
|
cmp, env,
|
||||||
fs::OpenOptions,
|
|
||||||
future::Future,
|
future::Future,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
|
@ -4246,7 +4245,8 @@ async fn join_channel_internal(
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
room.update(cx, |room, _| room.next_room_update()).await;
|
room.update(cx, |room, _| room.room_update_completed())
|
||||||
|
.await;
|
||||||
|
|
||||||
let task = room.update(cx, |room, cx| {
|
let task = room.update(cx, |room, cx| {
|
||||||
if let Some((project, host)) = room.most_active_project(cx) {
|
if let Some((project, host)) = room.most_active_project(cx) {
|
||||||
|
@ -4259,16 +4259,6 @@ async fn join_channel_internal(
|
||||||
task.await?;
|
task.await?;
|
||||||
return anyhow::Ok(true);
|
return anyhow::Ok(true);
|
||||||
}
|
}
|
||||||
use std::io::Write;
|
|
||||||
writeln!(
|
|
||||||
OpenOptions::new()
|
|
||||||
.write(true)
|
|
||||||
.append(true)
|
|
||||||
.open("/Users/conrad/dbg")
|
|
||||||
.unwrap(),
|
|
||||||
"no jokes"
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
anyhow::Ok(false)
|
anyhow::Ok(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ workspace = { path = "../workspace", features = ["test-support"] }
|
||||||
|
|
||||||
unindent.workspace = true
|
unindent.workspace = true
|
||||||
|
|
||||||
[package.metadata.bundle]
|
[package.metadata.bundle-dev]
|
||||||
icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
|
icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
|
||||||
identifier = "dev.zed.Zed-Dev"
|
identifier = "dev.zed.Zed-Dev"
|
||||||
name = "Zed Dev"
|
name = "Zed Dev"
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.developer.associated-domains</key>
|
|
||||||
<array><string>applinks:cirw.in</string></array>
|
|
||||||
<key>com.apple.security.automation.apple-events</key>
|
<key>com.apple.security.automation.apple-events</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.cs.allow-jit</key>
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
@ -12,8 +10,14 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.device.camera</key>
|
<key>com.apple.security.device.camera</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.keychain-access-groups</key>
|
<key>com.apple.security.personal-information.addressbook</key>
|
||||||
<array><string>MQ55VZLNZQ.dev.zed.Shared</string></array>
|
<true/>
|
||||||
|
<key>com.apple.security.personal-information.calendars</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.personal-information.location</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.personal-information.photos-library</key>
|
||||||
|
<true/>
|
||||||
<!-- <key>com.apple.security.cs.disable-library-validation</key>
|
<!-- <key>com.apple.security.cs.disable-library-validation</key>
|
||||||
<true/> -->
|
<true/> -->
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -61,20 +61,11 @@ use zed::{
|
||||||
only_instance::{ensure_only_instance, IsOnlyInstance},
|
only_instance::{ensure_only_instance, IsOnlyInstance},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::open_url::{OpenListener, OpenRequest};
|
use crate::open_listener::{OpenListener, OpenRequest};
|
||||||
|
|
||||||
mod open_url;
|
mod open_listener;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
writeln!(
|
|
||||||
OpenOptions::new()
|
|
||||||
.write(true)
|
|
||||||
.append(true)
|
|
||||||
.open("/Users/conrad/dbg")
|
|
||||||
.unwrap(),
|
|
||||||
"HELLO"
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
let http = http::client();
|
let http = http::client();
|
||||||
init_paths();
|
init_paths();
|
||||||
init_logger();
|
init_logger();
|
||||||
|
|
|
@ -43,16 +43,6 @@ impl OpenListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn open_urls(&self, urls: Vec<String>) {
|
pub fn open_urls(&self, urls: Vec<String>) {
|
||||||
writeln!(
|
|
||||||
OpenOptions::new()
|
|
||||||
.write(true)
|
|
||||||
.append(true)
|
|
||||||
.open("/Users/conrad/dbg")
|
|
||||||
.unwrap(),
|
|
||||||
"{:?}",
|
|
||||||
&urls,
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
self.triggered.store(true, Ordering::Release);
|
self.triggered.store(true, Ordering::Release);
|
||||||
let request = if let Some(server_name) =
|
let request = if let Some(server_name) =
|
||||||
urls.first().and_then(|url| url.strip_prefix("zed-cli://"))
|
urls.first().and_then(|url| url.strip_prefix("zed-cli://"))
|
Loading…
Reference in a new issue