Render overlay after remote project becomes read-only

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-04 17:28:18 +01:00
parent dc5a09b3f7
commit b21d91db22
7 changed files with 73 additions and 17 deletions

View file

@ -127,6 +127,12 @@ pub enum Status {
ReconnectionError { next_reconnection: Instant },
}
impl Status {
pub fn is_connected(&self) -> bool {
matches!(self, Self::Connected { .. })
}
}
struct ClientState {
credentials: Option<Credentials>,
status: (watch::Sender<Status>, watch::Receiver<Status>),