Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use preview server when not on stable

Nathan Sobo2d411303bb3b
diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs
index a32c415f7e9..d28c1ab1a9b 100644
--- a/crates/client/src/client.rs
+++ b/crates/client/src/client.rs
@@ -1011,9 +1011,9 @@ impl Client {
credentials: &Credentials,
cx: &AsyncAppContext,
) -> Task<Result<Connection, EstablishConnectionError>> {
- let is_preview = cx.read(|cx| {
+ let use_preview_server = cx.read(|cx| {
if cx.has_global::<ReleaseChannel>() {
- *cx.global::<ReleaseChannel>() == ReleaseChannel::Preview
+ *cx.global::<ReleaseChannel>() != ReleaseChannel::Stable
} else {
false
}
@@ -1028,7 +1028,7 @@ impl Client {
let http = self.http.clone();
cx.background().spawn(async move {
- let mut rpc_url = Self::get_rpc_url(http, is_preview).await?;
+ let mut rpc_url = Self::get_rpc_url(http, use_preview_server).await?;
let rpc_host = rpc_url
.host_str()
.zip(rpc_url.port_or_known_default())