History

Use preview server when not on stable (#2909)

This PR updates our client code to connect to preview whenever we're not on stable. This will make it more likely that we'll be able to collaborate on a dev build, but obviously won't work if there's a protocol change on main that hasn't made its way to preview yet.

Nathan Sobo committed 3 years ago

Commit a2e91e42 parents 246b699 2d411301 file · +3 −3Browse files

Unified · Split

crates/client/src/client.rs+3−3
@@ -1011,9 +1011,9 @@ impl Client { · 1010 unmodified lines
10111011 credentials: &Credentials,
10121012 cx: &AsyncAppContext,
10131013 ) -> Task<Result<Connection, EstablishConnectionError>> {
1014− let is_preview = cx.read(|cx| {
1014+ let use_preview_server = cx.read(|cx| {
10151015 if cx.has_global::<ReleaseChannel>() {
1016− *cx.global::<ReleaseChannel>() == ReleaseChannel::Preview
1016+ *cx.global::<ReleaseChannel>() != ReleaseChannel::Stable
10171017 } else {
10181018 false
10191019 }
@@ -1028,7 +1028,7 @@ impl Client { · 8 unmodified lines
10281028
10291029 let http = self.http.clone();
10301030 cx.background().spawn(async move {
1031− let mut rpc_url = Self::get_rpc_url(http, is_preview).await?;
1031+ let mut rpc_url = Self::get_rpc_url(http, use_preview_server).await?;
10321032 let rpc_host = rpc_url
10331033 .host_str()
10341034 .zip(rpc_url.port_or_known_default())

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t